Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis pull request refactors member and family profile entity relationships by establishing bidirectional synchronization between Member and FamilyMemberProfile, adding wish list management repositories, and introducing a new withdrawal service that handles cascading profile deletion with associated wish count cleanup. Changes
Sequence DiagramsequenceDiagram
participant Client
participant AuthController
participant AuthService
participant MemberRepo as MemberRepository
participant FamilyRepo as FamilyMemberProfileRepository
participant WishListRepo as MemberWishListRepository
participant TransWishRepo as MemberTransformedRecipeWishRepository
Client->>AuthController: withdraw(memberId)
AuthController->>AuthService: withdraw(memberId)
AuthService->>MemberRepo: findById(memberId)
MemberRepo-->>AuthService: Member
AuthService->>FamilyRepo: findByMember(member)
FamilyRepo-->>AuthService: FamilyMemberProfile (optional)
alt Profile exists
AuthService->>WishListRepo: findMemberWishListsByFamilyMemberProfile_Id(profileId)
WishListRepo-->>AuthService: List<MemberWishList>
Note over AuthService: Extract recipe IDs
AuthService->>WishListRepo: decreaseWishCount(recipeIds)
WishListRepo-->>AuthService: ✓
AuthService->>TransWishRepo: findMemberTransformedRecipeWishesByFamilyMemberProfile_Id(profileId)
TransWishRepo-->>AuthService: List<MemberTransformedRecipeWish>
Note over AuthService: Extract recipe IDs
AuthService->>TransWishRepo: decreaseWishCount(recipeIds)
TransWishRepo-->>AuthService: ✓
AuthService->>FamilyRepo: delete(profile)
FamilyRepo-->>AuthService: ✓
end
AuthService->>MemberRepo: delete(member)
MemberRepo-->>AuthService: ✓
AuthService-->>AuthController: ✓
AuthController-->>Client: 200 OK
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
#️⃣연관된 이슈
📝작업 내용
스크린샷 (선택)
💬리뷰 요구사항(선택)
Summary by CodeRabbit