아바타 생성시 garden 연결#113
Conversation
|
Caution Review failedThe pull request is closed. Walkthrough아바타 생성 이후의 처리 로직을 확장해 위시트리 단계별 최대 정원 수를 검사하고, 여유가 있으면 새 정원을 생성·연결, 한도 도달 시 오류를 발생시키도록 추가했습니다. 이를 위해 WishTreeStage에 maxGardens를 도입하고, ErrorCode에 MAX_GARDENS_REACHED를 추가했습니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant AS as AvatarService
participant AR as AvatarRepository
participant WR as WishTreeRepository
participant GR as GardenRepository
U->>AS: createAvatar(userId, nickname, imageUrl, masterId)
AS->>AR: save(new Avatar)
AR-->>AS: newAvatar
AS->>WR: findByUserId(userId)
WR-->>AS: wishTree (or null)
alt WishTree not found
AS-->>U: throw NOT_FOUND (WishTree)
else WishTree found
AS->>AS: stage = wishTree.getStage()\nmax = stage.getMaxGardens(stage)
AS->>AS: current = user.getGardens().size()
alt current < max
AS->>GR: save(new Garden(user, newAvatar, slot=current+1))
GR-->>AS: saved Garden
AS-->>U: return (created)
else max reached
AS-->>U: throw MAX_GARDENS_REACHED
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 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 Review profile: CHILL Plan: Pro 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (3)
✨ 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