T-18 트랙 멤버 배정 - #72
Open
ff1451 wants to merge 1 commit into
Open
Conversation
- member.profile_image_url 컬럼 추가(V10) — 홈페이지 "함께 할 멤버들"에 필요하지만
현재 스키마에 없던 컬럼. 컬럼과 읽기만 추가하고 쓰기 API는 만들지 않는다(INV-13,
ADR-012) — Member 엔티티에 setter 없이 getter만 노출.
- 트랙 멤버 배정 API: POST(배정)/DELETE(해제)/PATCH .../visibility(숨김)/PATCH
.../order(순서) — study-points/tech-stacks의 전체 교체 패턴과 달리 스펙이 명시한
개별 CRUD를 그대로 따랐다(대상이 3~5개로 고정되지 않고 트랙마다 수십 명일 수 있어서).
- INV-8(같은 트랙에 같은 부원 중복 배정 금지)은 DB unique 제약(uk_track_page_member)
더해 애플리케이션에서도 배정 전에 검사해 깔끔한 409로 응답한다. 같은 요청 안에
memberIds가 중복된 경우도 같은 예외로 막는다.
- 명부는 포트 추상화 없이 MemberRepository를 직접 조회한다(ADR-012, 외부 일정 의존
해소됨).
- 공개 트랙 상세(GET /v1/tracks/{slug})에 members 필드를 추가했다 — 숨김(is_visible=false)
과 status != ACTIVE인 부원은 제외한다(INV-11). CurriculumQueryService와 같은 이유로
N+1을 피한다: 배정 목록 1쿼리 + 부원 IN절 배치 조회 1쿼리.
- 관리자 배정 목록(GET .../members)은 저트래픽 편집 화면이라 부원 조회의 N+1을
감수한다(T-11 관리자 커리큘럼 트리와 같은 이유).
검증: 로컬 Postgres에 V10 적용 후 부팅 성공(Flyway validate, Hibernate 스키마 검증
통과). ./gradlew test 전체 통과, 3회 연속.
|
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 |
Author
|
Refs #30 |
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.
요약
V10__add_member_profile_image_url.sql:member.profile_image_url컬럼 추가. 홈페이지 "함께 할 멤버들"에 필요하지만 현재 스키마에 없던 컬럼. 컬럼과 읽기만 추가하고 쓰기 API는 만들지 않는다(INV-13, ADR-012) —Member엔티티에 getter만 노출, setter/빌더 파라미터 없음./v1/admin/track-pages/{id}/members):POST(배정) /DELETE /{memberId}(해제) /PATCH /{memberId}/visibility(숨김) /PATCH /order(순서). study-points/tech-stacks의 전체 교체 패턴과 다르게, 스펙이 명시한 개별 CRUD를 그대로 따랐다 — 대상이 3~5개로 고정되지 않고 트랙마다 수십 명일 수 있어서다.GET /v1/tracks/{slug})에members필드를 추가했다. 숨김(is_visible=false)과status != ACTIVE인 부원은 제외한다(INV-11).설계 메모
unique(track_page_id, member_id)에 더해 애플리케이션에서도 배정 전에 검사해 409로 응답한다. 같은 요청의memberIds안에 중복이 있는 경우도 같은 예외로 막는다(그냥 두면 DB 제약 위반으로 500이 났을 것).MemberRepository를 직접 조회한다(ADR-012 — 명부가 이미 구현되어 외부 일정 의존이 해소됨).CurriculumQueryService와 같은 이유로 N+1을 피한다: 배정 목록 1쿼리 + 부원 IN절 배치 조회 1쿼리.GET .../members)은 저트래픽 편집 화면이라 부원 조회의 N+1을 감수한다(T-11 관리자 커리큘럼 트리와 같은 이유).검증
./gradlew test전체 통과, 3회 연속.남은 항목
Refs #30 (프로젝트), 브랜치는
feat/t17-image-upload(#71) 위에 스택 — T-14~T-17까지 포함된 상태입니다.머지하지 않습니다. 부원 리뷰 후 직접 머지 예정입니다.