Conversation
Chan531
reviewed
Apr 19, 2024
There was a problem hiding this comment.
SuccessCode와 FailureCode의 구성이 같은데 이를 분리하신 이유가 궁금합니다!
|
|
||
| @PostMapping | ||
| public CarrotResponse<?> createProduct(@RequestBody @Valid ProductCreateRequest request, | ||
| @RequestHeader(CustomHeaders.MEMBER_ID) Long memberId) { |
There was a problem hiding this comment.
이렇게 memberId를 받는 건 처음 보는데 @PathVariable과는 다르게 어떤 특징이 있는지 공유해주실 수 있나요?!
|
|
||
| private final ProductRepository productRepository; | ||
| private final MemberRepository memberRepository; | ||
| public void createProduct(ProductCreateRequest request, Long memberId) { |
There was a problem hiding this comment.
이 부분은 메소드 분리를 해준다면 더욱 깔끔한 코드가 될 거 같기도 하네요!
| private String title; | ||
|
|
||
| @Enumerated(EnumType.STRING) | ||
| @Column(name = "trade_type", nullable = false) |
There was a problem hiding this comment.
column마다 name을 지정해주는 이유가 혹시 있을까요??
mysql 같은 경우는 jpa를 통해 table을 자동으로 생성할 때 이런 카멜 케이스를 설정하신 name처럼 자동으로 변환해주는 걸로 알고 있어서요!
h2의 경우는 좀 다른가요?? 답변 주시면 감사하겠습니다!
gardening-y
reviewed
Apr 19, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue 📌
Description ✔️
To Reviewers