-
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
[FEAT] 사용자의 네일 세트 보관함 구현 #34
base: dev
Are you sure you want to change the base?
Conversation
|
||
public interface NailSetRepository extends ReactiveCrudRepository<NailSet, Integer> { | ||
Flux<NailSet> findAllBy(Pageable page); | ||
|
||
Flux<NailSet> findAllByUploadedBy(Integer uploadedUserId, Pageable page); | ||
|
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.
Flux<NailSet> findAllByUploadedBy(Integer uploadedUserId, Pageable page);
- 이 부분은 Integer로 업로드한 유저 아이디를 찾아오는데
Mono<NailSet> findByUploadedByAndNailGroupId(int uploadedUserId, int groupId);
- 이 부분은 int로 받아오는 이유가 있을까요? 가능하면 한 타입으로 일관하는게 좋을 것 같습니다.
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.
Integer
는 nullable 이지만 primitive type 인 int
는 NonNull이라서 이렇게 짰던 것 같네요. 양쪽 다 primitive type 인 int
로 수정하겠습니다.
.uploadedBy(userId) | ||
.build())) | ||
); | ||
} |
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.
public Mono<NailSet> cloneNailSetForUser(int userId, int setId)
해당 메서드에서 다중 요청이 들어올 경우도 고려해야할까요? userId
와 nailGroupId
조합에 대해 중복 보관이 발생할 가능성이 있을 것 같아서요
만약 그렇다면 데이터베이스 레벨에서 Unique Constraint가 있으면 좋을 것 같은데 의견 부탁드리겠습니다!
🔖 관련 티켓
SN-58 (Jira 링크)
📌 작업 개요
네일 세트의 사용자 보관함 기능 구현입니다
✅ 작업 항목
📝 추가 설명
사용자가 네일 세트 보관을 여러 번 요청할 경우에, 이미 해당 네일 세트를 보관한 경우에는 기존에 보관했던 정보를 그대로 반환하며 따로 오류를 내주거나 다른 상태를 반환하진 않습니다.