Skip to content

[Fix] 카테고리별 사이즈표 타입 필드 추가#133

Merged
kangcheolung merged 1 commit intodevelopfrom
feature/132
Feb 14, 2026
Merged

[Fix] 카테고리별 사이즈표 타입 필드 추가#133
kangcheolung merged 1 commit intodevelopfrom
feature/132

Conversation

@kangcheolung
Copy link
Copy Markdown
Member

@kangcheolung kangcheolung commented Feb 14, 2026

🔍️ 작업 내용

  • Closes #
    카테고리별 사이즈표 타입 필드 추가

✨ 상세 설명

✨ 상세 설명

  • 카테고리별로 사이즈표가 4가지 타입(상의&아우터, 바지, 스커트, 원피스)으로 고정되어 있어, 프론트엔드에서 타입에 맞는 사이즈표 이미지를 매핑하여 표시할 수 있도록 구현했습니다.
  • SizeChartType enum 생성 (TOP_OUTERWEAR, PANTS, SKIRT, DRESS)
  • Category 엔터티에 sizeChartType 필드 추가
  • ProductDetailResponse에 sizeChartType 필드 추가
  • 하위 카테고리는 자동으로 상위 카테고리의 타입을 참조하도록 구현

🛠️ 추후 리팩토링 및 고도화 계획

📸 스크린샷 (선택)

💬 리뷰 요구사항

Summary by CodeRabbit

새로운 기능

  • 상품의 사이즈 차트 유형 정보 추가
    • 상의 및 아우터, 바지, 스커트, 원피스별로 정확한 사이즈 가이드 제공
    • 카테고리 구조에 따라 자동으로 최적의 사이즈 차트 선택
  • 상품 상세 정보에서 해당하는 사이즈 차트 유형 조회 가능

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 14, 2026

Walkthrough

카테고리 엔티티에 새로운 SizeChartType 필드를 추가하고, 이를 상품 상세 응답에 포함시키는 기능을 구현했습니다. enum 타입 정의, 엔티티 생성/수정 로직 확장, converter 헬퍼 메서드 추가, DTO 필드 확장으로 구성됩니다.

Changes

Cohort / File(s) Summary
SizeChartType 열거형 정의
src/main/java/com/ongil/backend/domain/category/enums/SizeChartType.java
4개의 상수(TOP_OUTERWEAR, PANTS, SKIRT, DRESS)와 한글 설명을 포함하는 새로운 enum 타입 정의. Lombok @Getter, @RequiredArgsConstructor 적용.
Category 엔티티 확장
src/main/java/com/ongil/backend/domain/category/entity/Category.java
새로운 sizeChartType 필드 추가(JPA @Enumerated, @Column 매핑 포함). 생성자와 updateCategory 메서드 서명 확장하여 sizeChartType 파라미터 및 할당 로직 추가.
상품 응답 DTO 및 변환 로직
src/main/java/com/ongil/backend/domain/product/dto/response/ProductDetailResponse.java, src/main/java/com/ongil/backend/domain/product/converter/ProductConverter.java
ProductDetailResponse에 sizeChartType 필드 추가. ProductConverter에 getSizeChartType(Product) 헬퍼 메서드 추가(부모 카테고리 존재 시 부모의 sizeChartType 사용, 그 외 카테고리의 sizeChartType 사용).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

🐞 Fix

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목은 변경의 핵심을 명확하게 반영하고 있습니다. '카테고리별 사이즈표 타입 필드 추가'는 이 PR에서 추가된 SizeChartType enum과 관련 필드들의 주요 변경사항을 정확하게 요약합니다.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into develop

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/132

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
src/main/java/com/ongil/backend/domain/category/entity/Category.java (1)

32-34: 컬럼 길이 여유분 검토 필요.

length = 20은 현재 가장 긴 값인 TOP_OUTERWEAR(14자)에는 충분하지만, 향후 enum 값 추가 시 여유가 부족할 수 있습니다. length = 30 정도로 여유를 두는 것을 권장합니다.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@kangcheolung kangcheolung merged commit 4f320b7 into develop Feb 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant