Skip to content
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

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

return0927
Copy link
Member

@return0927 return0927 commented Mar 6, 2025

🔖 관련 티켓

SN-58 (Jira 링크)

📌 작업 개요

네일 세트의 사용자 보관함 기능 구현입니다

✅ 작업 항목

  • POST /users/me/nail-set/save
  • DELETE /users/me/nail-set/:id

📝 추가 설명

사용자가 네일 세트 보관을 여러 번 요청할 경우에, 이미 해당 네일 세트를 보관한 경우에는 기존에 보관했던 정보를 그대로 반환하며 따로 오류를 내주거나 다른 상태를 반환하진 않습니다.

@return0927 return0927 self-assigned this Mar 6, 2025
@github-actions github-actions bot changed the title Feat/sn 58 user nail set [FEAT] 네일 세트 생성 api 검토 Mar 6, 2025
@return0927 return0927 requested a review from onehowon March 6, 2025 09:37
@return0927 return0927 changed the title [FEAT] 네일 세트 생성 api 검토 [FEAT] 사용자의 네일 세트 보관함 구현 Mar 6, 2025

public interface NailSetRepository extends ReactiveCrudRepository<NailSet, Integer> {
Flux<NailSet> findAllBy(Pageable page);

Flux<NailSet> findAllByUploadedBy(Integer uploadedUserId, Pageable page);

Copy link
Contributor

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로 받아오는 이유가 있을까요? 가능하면 한 타입으로 일관하는게 좋을 것 같습니다.

Copy link
Member Author

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()))
);
}
Copy link
Contributor

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)

해당 메서드에서 다중 요청이 들어올 경우도 고려해야할까요? userIdnailGroupId 조합에 대해 중복 보관이 발생할 가능성이 있을 것 같아서요

만약 그렇다면 데이터베이스 레벨에서 Unique Constraint가 있으면 좋을 것 같은데 의견 부탁드리겠습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants