[volume-2] 요구사항 명세, 시퀀스 다이어그램, 클래스 다이어그램, ERD 작성#57
Open
najang wants to merge 9 commits intoLoopers-dev-lab:najangfrom
Open
[volume-2] 요구사항 명세, 시퀀스 다이어그램, 클래스 다이어그램, ERD 작성#57najang wants to merge 9 commits intoLoopers-dev-lab:najangfrom
najang wants to merge 9 commits intoLoopers-dev-lab:najangfrom
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. 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
🧭 Context & Decision
문제 정의
선택지와 결정
🏗️ Design Overview
변경 범위
docs/design/01-requirements.md,02-sequence-diagrams.md,03-class-diagram.md,04-erd.md주요 컴포넌트 책임
Brand: 브랜드 정보 관리. 삭제 시 연관 상품 연쇄 soft delete.Product: 상품 정보, 재고 차감/복원, 좋아요 수 관리. 비관적 락 대상.Like: 사용자-상품 좋아요 관계. 복합 키(userId + productId), 물리 삭제.CartItem: 장바구니 아이템. 동일 상품 수량 누적, soft delete.Order: 주문 Aggregate Root. 상태 전이 규칙 관리 (ORDERED→SHIPPING→DELIVERED, ORDERED→CANCELLED).OrderItem: 주문 시점 스냅샷(상품명/가격/브랜드명) 보존. Order를 통해서만 접근.🔁 Flow Diagram
Main Flow
sequenceDiagram autonumber participant Client participant API participant UseCase participant Domain participant DB Client->>API: 주문 요청 (POST /api/v1/orders) API->>UseCase: 주문 생성 rect rgb(230, 245, 255) Note over UseCase,DB: 트랜잭션: 재고 차감 + 주문 생성 UseCase->>Domain: 상품 조회 (비관적 락, productId 오름차순) Domain->>DB: SELECT FOR UPDATE DB-->>Domain: 상품 정보 Domain-->>UseCase: 판매 가능 검증 + 재고 차감 UseCase->>Domain: 주문 생성 (스냅샷 포함) Domain->>DB: 주문 + 주문아이템 저장 end rect rgb(255, 250, 230) Note over UseCase,DB: 별도 트랜잭션: 장바구니 정리 UseCase->>Domain: 장바구니 아이템 삭제 end UseCase-->>API: 주문 정보 API-->>Client: 201 CreatedChecklist