T-06 트랙 도메인 + 공개 조회 API - #60
Open
ff1451 wants to merge 1 commit into
Open
Conversation
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
|
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 ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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.
Refs #18
Base:
feat/t05-homepage-content-schema(#59) —track_page테이블에 의존한다.변경
TrackPage엔티티 —track(트랙 마스터, T-35) FK + slug·표시명·소개·이미지·순서·공개 여부.@SQLRestriction("deleted_at is null")은 매핑된 슈퍼클래스가 아니라 이 클래스에 직접 붙였다(Hibernate가 상속시키지 않는다).TrackPageRepository—findAllByPublishedTrueOrderByDisplayOrderAsc,findBySlugAndPublishedTrue. 숨김(is_published=false) 필터링은 이 공개용 쿼리 메서드에서만 건다 —@SQLRestriction은deleted_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(신규):display_order순SecurityConfigpermitAll 배선 검증)./gradlew test— 43개 전체 통과, 실패 0.