T-13 커리큘럼 세트 복제 - #67
Open
ff1451 wants to merge 1 commit into
Open
Conversation
POST /v1/admin/track-pages/{id}/curriculums에 sourceCurriculumId를 주면
트리 전체(주차·토픽·세부항목)를 복제한다. 다른 트랙의 세트도 원본으로 쓸 수
있다 — 시안에 "다른 트랙 커리큘럼 복제해서 시작 가능"이 명시되어 있다.
- CurriculumCreateRequest: sourceCurriculumId 필드 추가. 복제 시 name을
비우면 원본 이름을 그대로 쓰고, 복제가 아닌데 이름이 없으면
NAME_REQUIRED(400)
- AdminCurriculumTreeService.cloneTree — 원본의 주차>토픽>세부항목을 순회하며
새 id로 저장. display_order는 원본과 동일하게 유지(개수·순서 보존, AC-2.8)
- 복제본은 항상 비공개로 생성된다(기존 로직 그대로 — published(false))
테스트: AdminCurriculumCloneIntegrationTest(신규) —
- AC-2.8 복제 후 주차 2개·토픽 순서·세부항목 순서가 원본과 동일, 복제본은
비공개, 원본은 영향받지 않음
- 이름 없이 복제하면 원본 이름 사용
- 복제가 아닌데 이름이 없으면 400
./gradlew test 3회 연속 전체 통과(74개, 실패 0).
Refs #25
---
이걸로 P2(커리큘럼) 완료 — T-10~T-13, PR #64~#67.
|
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 |
Open
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 #25
Base:
feat/t12-public-curriculum(#66)P2(커리큘럼)의 마지막 티켓.
sourceCurriculumId로 트리 전체를 복제한다.변경
CurriculumCreateRequest에sourceCurriculumId추가. 복제 시name을 비우면 원본 이름을 그대로 쓰고, 복제가 아닌데 이름이 없으면NAME_REQUIRED(400).sourceCurriculumId가 대상 트랙 페이지에 속할 필요는 없다.AdminCurriculumTreeService.cloneTree— 원본의 주차 > 토픽 > 세부항목을 순회하며 새 id로 저장한다.display_order는 원본과 동일하게 유지해 개수·순서를 보존한다(AC-2.8).테스트
AdminCurriculumCloneIntegrationTest(신규):./gradlew test를 3회 연속 돌려 전체 통과(74개, 실패 0) 확인.이걸로 P2(커리큘럼) 완료 — T-10
T-13, PR #64#67. 다음은 P3(활동, T-14~T-16)로 넘어간다.