Skip to content

feat: 게시글 카테고리에 동행, 중고거래 추가#765

Closed
sukangpunch wants to merge 2 commits into
developfrom
feat/add-companion-and-used-trade-post-category
Closed

feat: 게시글 카테고리에 동행, 중고거래 추가#765
sukangpunch wants to merge 2 commits into
developfrom
feat/add-companion-and-used-trade-post-category

Conversation

@sukangpunch

@sukangpunch sukangpunch commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

관련 이슈

작업 내용

게시글 카테고리(PostCategory)에 동행, 중고거래 두 가지를 추가했습니다.

  • PostCategory enum에 동행, 중고거래 추가
  • post 테이블 category ENUM 컬럼에 신규 값 추가 마이그레이션 (V52)
  • 테스트 추가
    • PostCommandServiceTest: 신규 카테고리로 게시글 생성 (@ValueSource동행, 중고거래 추가)
    • PostQueryServiceTest: 동행 / 중고거래 카테고리별 조회 필터링 검증

특이 사항

  • 검증·필터링 로직은 PostCategory.values() 기반으로 동적 동작하므로, enum 값 추가만으로 생성/조회 로직에 자동 반영됩니다. 별도 서비스/리포지토리 로직 수정은 필요하지 않습니다.
  • category 컬럼은 @Enumerated(EnumType.STRING)으로 문자열 저장되며, 마이그레이션의 ENUM 값과 enum 이름이 일치합니다.

- PostCategory enum에 동행, 중고거래 추가
- post 테이블 category ENUM 컬럼 마이그레이션 (V52)
- 신규 카테고리 게시글 생성 및 카테고리별 조회 필터링 테스트 추가

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sukangpunch sukangpunch self-assigned this Jun 17, 2026
@sukangpunch sukangpunch added 기능 최종 리뷰 최소 1명 필수 labels Jun 17, 2026

@ParameterizedTest
@ValueSource(strings = {"자유", "질문", "동행", "중고거래"})
@Transactional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 어노테이션은 필요없는 거 같습니다 !

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 66de0326-36d6-4cf1-8251-79a81e45e3b9

📥 Commits

Reviewing files that changed from the base of the PR and between bf0b7b2 and 7993d10.

📒 Files selected for processing (3)
  • src/main/java/com/example/solidconnection/community/post/domain/PostCategory.java
  • src/main/resources/db/migration/V52__add_companion_and_used_trade_to_post_category.sql
  • src/test/java/com/example/solidconnection/community/post/service/PostQueryServiceTest.java

Walkthrough

이번 PR은 세 가지 변경으로 구성됩니다.

  1. PostCategory enum 확장

    • 기존 전체, 자유, 질문 목록에 동행, 중고거래 두 상수가 추가되었습니다.
    • isValid(String name) 메서드의 허용 범위도 자동으로 확장됩니다.
  2. DB 마이그레이션 추가 (V52)

    • post.category 컬럼을 ENUM('자유', '전체', '질문', '동행', '중고거래') NULL 형태로 수정하는 Flyway 스크립트가 추가되었습니다.
  3. 서비스 테스트 2건 추가

    • 동행 카테고리 조회 시 해당 카테고리 게시글만 반환되는지 검증합니다.
    • 중고거래 카테고리 조회 시 해당 카테고리 게시글만 반환되는지 검증합니다.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • Gyuhyeok99
  • wibaek
  • lsy1307
  • Hexeong
  • JAEHEE25
  • whqtker
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-companion-and-used-trade-post-category

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.

@sukangpunch sukangpunch deleted the feat/add-companion-and-used-trade-post-category branch June 17, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

기능 최종 리뷰 최소 1명 필수

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 커뮤니티 카테고리에 동행·중고거래 추가

2 participants