Skip to content

T-06 트랙 도메인 + 공개 조회 API - #60

Open
ff1451 wants to merge 1 commit into
feat/t05-homepage-content-schemafrom
feat/t06-track-domain
Open

T-06 트랙 도메인 + 공개 조회 API#60
ff1451 wants to merge 1 commit into
feat/t05-homepage-content-schemafrom
feat/t06-track-domain

Conversation

@ff1451

@ff1451 ff1451 commented Aug 19, 2026

Copy link
Copy Markdown

Refs #18
Base: feat/t05-homepage-content-schema (#59) — track_page 테이블에 의존한다.

변경

  • TrackPage 엔티티 — track(트랙 마스터, T-35) FK + slug·표시명·소개·이미지·순서·공개 여부. @SQLRestriction("deleted_at is null")은 매핑된 슈퍼클래스가 아니라 이 클래스에 직접 붙였다(Hibernate가 상속시키지 않는다).
  • TrackPageRepositoryfindAllByPublishedTrueOrderByDisplayOrderAsc, findBySlugAndPublishedTrue. 숨김(is_published=false) 필터링은 이 공개용 쿼리 메서드에서만 건다@SQLRestrictiondeleted_at만 전역 처리한다. 나중에 관리자 API(T-07)는 숨김 트랙도 봐야 하므로, 그 필터를 엔티티 레벨로 올리면 안 된다.
  • GET /v1/tracks, GET /v1/tracks/{slug}SecurityConfig/v1/tracks/** permitAll 추가.
  • TrackDetailResponse헤더 필드만 채운다(slug, name, tagline, heroImageUrl, ogImageUrl, seoDescription). studyPoints(T-08)·techStacks(T-09)·curriculum(T-12)·members(T-18)는 아직 백엔드 데이터가 없어서 빈 배열/placeholder 구조를 미리 만들지 않았다 — 각 도메인 티켓이 이 레코드에 필드를 추가하는 방식으로 확장할 것이다(JSON에 키가 늘어나는 건 호환되는 변경이다).

테스트

TrackIntegrationTest(신규):

  • AC-1.3 공개 목록은 공개된 트랙만 display_order
  • 상세 조회가 인증 없이 200 (SecurityConfig permitAll 배선 검증)
  • INV-11 숨김 트랙은 존재하지 않는 slug와 구분되지 않게 404 (존재 여부를 유출하지 않는다)

./gradlew test43개 전체 통과, 실패 0.

TrackPage 엔티티와 공개 조회 API의 뼈대. 트랙 마스터(T-35)와 분리된 홈페이지
노출 프로필이다(ADR-002/003).

- TrackPage — @SQLRestriction("deleted_at is null"), track(FK) + slug/표시명/
  소개/이미지/순서/공개 여부
- TrackPageRepository — findAllByPublishedTrueOrderByDisplayOrderAsc,
  findBySlugAndPublishedTrue (숨김·삭제 필터링은 여기서만 — @SQLRestriction은
  deleted_at만 전역 처리하고 is_published는 공개 쿼리에서만 건다, 나중에
  관리자 API는 숨김 트랙도 봐야 하므로)
- GET /v1/tracks, GET /v1/tracks/{slug} — SecurityConfig에 permitAll 추가
- TrackDetailResponse는 헤더 필드만 채운다. studyPoints(T-08)·techStacks(T-09)·
  curriculum(T-12)·members(T-18)는 존재하지 않는 데이터라 자리표시자를 만들지
  않고, 해당 티켓이 이 레코드에 필드를 추가하는 방식으로 확장한다

테스트: TrackIntegrationTest(신규) —
- AC-1.3 공개 목록은 공개 트랙만 display_order 순
- 상세 조회가 인증 없이 200 (SecurityConfig permitAll 검증)
- INV-11 숨김 트랙은 존재하지 않는 slug와 구분되지 않게 404

./gradlew test 전체 통과(43개, 실패 0).

Refs #18
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 0708fdf3-f65a-4c56-b4b8-c6c1cfbab23d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

This was referenced Aug 19, 2026
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