Skip to content

T-10 커리큘럼 세트 - #64

Open
ff1451 wants to merge 1 commit into
feat/t09-tech-stacksfrom
feat/t10-curriculum-sets
Open

T-10 커리큘럼 세트#64
ff1451 wants to merge 1 commit into
feat/t09-tech-stacksfrom
feat/t10-curriculum-sets

Conversation

@ff1451

@ff1451 ff1451 commented Aug 19, 2026

Copy link
Copy Markdown

Refs #22
Base: feat/t09-tech-stacks (#63)

P2(커리큘럼)의 첫 티켓. track_page 아래 커리큘럼 세트("비기너", "심화") CRUD.

변경

  • Curriculum — 최상위 엔티티라 SoftDeletableEntity 사용, @SQLRestriction으로 삭제된 세트는 전 쿼리에서 제외(ADR-006).
  • GET/POST /v1/admin/track-pages/{trackPageId}/curriculums — 목록/생성(항상 비공개로 시작).
  • PUT/DELETE /v1/admin/curriculums/{id} — 이름 수정 / soft delete.
  • PATCH /v1/admin/curriculums/{id}/publishAC-2.1: 공개로 지정하면 같은 트랙의 기존 공개 세트를 먼저 벌크 UPDATE로 내린 뒤 대상을 공개로 바꾼다. 벌크 UPDATE는 즉시 실행되므로, 뒤이어 대상 엔티티의 dirty-check 반영이 커밋 시점에 일어나도 트랙당 공개 1개만 허용하는 partial unique index(uq_curriculum_published)에 걸리지 않는다 — JPA 엔티티 두 개를 각각 dirty-check로만 바꾸면 flush 순서가 보장되지 않아 이 순서 문제가 생길 수 있어서 명시적으로 피했다.

의도적으로 아직 안 만든 것

GET /v1/admin/curriculums/{id}(3단 트리 전체)는 API 스펙 표에 있지만 만들지 않았다 — 주차·토픽이 아직 없는 지금은 반환할 트리가 없다. T-11에서 실제 트리와 함께 추가한다.

테스트

AdminCurriculumIntegrationTest(신규):

  • 세트 생성 직후 비공개 상태
  • AC-2.1 공개 지정 시 기존 공개 세트가 자동으로 비공개됨
  • 이름 수정 반영, soft delete 후 목록 조회에서 제외

./gradlew test를 3회 연속 돌려 전체 통과(62개, 실패 0) 확인.

트랙 페이지의 커리큘럼 세트("비기너", "심화") CRUD + 공개 지정.

- Curriculum — 최상위 엔티티라 SoftDeletableEntity 사용, @SQLRestriction으로
  삭제된 세트는 전 쿼리에서 제외
- GET/POST /v1/admin/track-pages/{trackPageId}/curriculums — 목록/생성(항상
  비공개로 시작). sourceCurriculumId로 복제하는 기능은 T-13에서 추가한다
- PUT/DELETE /v1/admin/curriculums/{id} — 이름 수정 / soft delete
- PATCH /v1/admin/curriculums/{id}/publish — AC-2.1: 공개로 지정하면 같은
  트랙의 기존 공개 세트를 먼저 벌크 UPDATE로 내린 뒤 대상을 공개로 바꾼다.
  벌크 UPDATE가 즉시 실행되므로, 뒤이은 dirty-check 반영 시 트랙당 공개 1개만
  허용하는 partial unique index(uq_curriculum_published)에 걸리지 않는다
- GET /v1/admin/curriculums/{id}(3단 트리 전체)는 아직 안 만들었다 — 주차/토픽이
  없는 지금은 의미가 없고, T-11에서 실제 트리와 함께 추가한다

테스트: AdminCurriculumIntegrationTest(신규) —
- 생성 직후 비공개
- AC-2.1 공개 지정 시 기존 공개 세트 자동 비공개
- 이름 수정, soft delete 후 목록에서 제외

./gradlew test 3회 연속 전체 통과(62개, 실패 0).

Refs #22
@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: 958516c6-5c63-4388-a0d2-8cbd876a2432

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.

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