feat/draft : 랜덤 드래프트 기능 추가 - #119
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough랜덤 선수 선택 기능이 드래프트 플로우에 추가되었다. 컨트롤러에 WebSocket 엔드포인트가 추가되고, 서비스에 랜덤 선택 로직과 Redis 발행이 구현되었다. DTO에 빌더가 도입되었고, Player 엔티티에 DraftRequest 변환 유틸이 추가되었다. 레포지토리에 가용 포지션 조회와 랜덤 선수 조회 쿼리가 추가되었다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Client (WebSocket)
participant DC as DraftController
participant DS as DraftService
participant ER as ElementTypeRepository
participant PR as PlayerRepository
participant S as SaveDraft/Persistence
participant R as Redis (draft.{draftId})
C->>DC: /draft/selectRandomPlayer (DraftRequest, Principal)
DC->>DS: selectRandomPlayer(request, principal)
DS->>ER: findAvailableElementTypesByParticipant(participantId)
ER-->>DS: List<ElementType>
DS->>PR: findRandomAvailablePlayer(draftId, elementTypeIds)
PR-->>DS: Optional<Player>
alt player found
DS->>S: saveDraft(DraftRequest.from(Player))
S-->>DS: saved
DS->>R: publish serialized DraftRequest
R-->>C: message on channel draft.{draftId}
else none
DS-->>DC: IllegalArgumentException
DC-->>C: error propagated
end
note over DC,DS: 신규 랜덤 선택 플로우
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (6)
✨ 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. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit