-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PC-270] 매칭 조각 확인 기능 구현 #30
base: feature/PC-268-matching-algorithm
Are you sure you want to change the base?
[PC-270] 매칭 조각 확인 기능 구현 #30
Conversation
|
||
@NoArgsConstructor | ||
@Getter | ||
@AllArgsConstructor |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
저는 Response 객체는 record를 사용했는데, 통일성을 위해 record를 사용하는 것은 어떨까요 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은 것 같습니다!
PR이 쌓여있어서...충돌이 날 것 같으니 다음 PR에 record로 전부 수정해놓겠습니다!
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@Getter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url 하나만 Response 객체로 만든 이유가 있으실까요 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
json 형식으로 반환하는것이 PlainText로 반환하는 것보다 클라이언트가 사용할 때 편리할 것이라고 생각해서 Response 객체를 만들었습니다.
Map보다는 Response 객체를 만드는 것이 코드 통일성면이나 이후 확장성면에서 좋다고 생각합니다.
@@ -54,4 +53,12 @@ public MatchInfo(LocalDate date, User user1, User user2) { | |||
public static MatchInfo createMatchInfo(User user1, User user2) { | |||
return new MatchInfo(LocalDate.now(), user1, user2); | |||
} | |||
|
|||
public void checkPiece(Long userId) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
파라미터로 user1과 user2 id 만 보장이 있는 것은 아닌거 같은데. else로 처리하게 되면 문제가 생길 수 있을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getMatchInfo를 통해 얻은 MatchInfo는 반드시 user1또는 user2만 있기 때문에 그렇게 구현을 했는데, 생각해보니 캡슐화를 지키지 못한 구현이었네요! 수정하겠습니다.
🔗 관련 이슈
PC-270
✨ 작업 내용
✅ 체크리스트
🎃 새롭게 알게된 사항
📋 참고 사항