T-10 커리큘럼 세트 - #64
Open
ff1451 wants to merge 1 commit into
Open
Conversation
트랙 페이지의 커리큘럼 세트("비기너", "심화") 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
|
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 #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}/publish— AC-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(신규):./gradlew test를 3회 연속 돌려 전체 통과(62개, 실패 0) 확인.