refactor(Bookmark): 북마크 삭제 softDelete로 변경#185
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough이 변경사항은 북마크(Bookmark) 엔티티에 소프트 삭제(soft delete) 기능을 도입하고, 관련 서비스, 리포지토리, 컨트롤러에서 북마크의 삭제 상태를 고려하도록 쿼리 및 로직을 수정합니다. 북마크 삭제 시 실제 삭제 대신 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Controller
participant Service
participant Repository
participant DB
User->>Controller: 북마크 생성 요청(storeId)
Controller->>Service: createBookmark(storeId, user)
Service->>Repository: findRawByUserAndStoreAndDeletedFalse(user, store)
alt 북마크 존재(삭제 아님)
Service->>Controller: 예외 발생(이미 존재)
else 북마크 존재(삭제됨)
Service->>Repository: restore()
Service->>Controller: 복원된 북마크 반환
else 북마크 없음
Service->>Repository: save(new Bookmark(deleted=false))
Service->>Controller: 새 북마크 반환
end
User->>Controller: 북마크 삭제 요청(storeId)
Controller->>Service: deleteBookmark(storeId, user)
Service->>Repository: findActiveByUserIdAndStoreId(storeId, userId)
alt 북마크 존재
Service->>Repository: softDelete()
Service->>Controller: 삭제 완료 메시지 반환
else 북마크 없음
Service->>Controller: 예외 발생(존재하지 않음)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20분 Possibly related PRs
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
작업 요약
Issue Link
#178
문제점 및 어려움
해결 방안
Reference
Summary by CodeRabbit
신규 기능
버그 수정
스타일