Merged
Conversation
|
Caution Review failedPull request was closed or merged during review 🐰 변경사항 분석Walkthrough카드셋 메타데이터 저장소 구조를 도입하여 좋아요와 북마크 카운트를 추적합니다. RabbitMQ 소비자를 구현하여 반응 이벤트를 처리하고 메타데이터를 업데이트합니다. API 응답에 카운트 필드를 추가합니다. Changes
Sequence DiagramsequenceDiagram
participant RMQ as RabbitMQ
participant RC as ReactionConsumer
participant Repo as MetadataRepository
participant DB as Database
RMQ->>RC: 반응 이벤트 발행<br/>(LIKE_ADDED, BOOKMARK_ADDED 등)
RC->>RC: 이벤트 검증<br/>(targetType=CARD_SET 확인)
RC->>Repo: upsertAndIncrementLike()<br/>또는 기타 업서트 메서드 호출
Repo->>DB: INSERT ... ON DUPLICATE KEY UPDATE<br/>또는 UPDATE with GREATEST
DB-->>Repo: 행 업데이트 완료
Repo-->>RC: void 반환
RC->>RC: 로깅
sequenceDiagram
participant Client
participant Controller as CardsetController
participant UseCase as CardsetUseCase
participant Repo as MetadataRepository
participant DB as Database
Client->>Controller: GET /cardsets
Controller->>UseCase: findAll(userId)
UseCase->>Repo: findByCardSetIds(cardsetIds)
Repo->>DB: SELECT * FROM card_set_metadata
DB-->>Repo: 메타데이터 행들
Repo-->>UseCase: Map<cardSetId, {likeCount, bookmarkCount}>
UseCase->>UseCase: 각 카드셋에 카운트 어셈블
UseCase-->>Controller: [{cardset, imageUrl, likeCount, bookmarkCount}]
Controller->>Controller: CardsetResponse.from()<br/>모든 필드 포함
Controller-->>Client: 응답 전송
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 변경 내용
✅ 체크리스트
💬 기타 참고 사항
Summary by CodeRabbit
릴리스 노트
New Features
API Changes
likeCount와bookmarkCount필드 추가