Repository navigation
Conversation
EventManageSummary는 행사 필드를 목록 응답과 1:1로 복사만 하는 객체였다. 스스로 지키는 규칙이 없어 도메인에 둘 이유가 없고, 화면 필드가 늘 때마다 도메인과 응답 두 곳을 고쳐야 한다. 서비스는 행사 페이지(getEvents)와 신청자 수(getApplicantCounts)를 따로 돌려주고, 컨트롤러가 조합한다. 모집 상태는 응답을 만들 때 Event.calculateRecruitStatus로 계산한다. 상세의 EventManageDetail도 미리 계산한 모집 상태를 빼고 행사·질문·신청자 수 묶음만 남긴다.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
github-actions
Bot
requested review from
jjunh33,
sangrae2325,
tnals0924 and
xeoxxn
October 17, 2026 15:52
This was referenced Oct 17, 2026
tnals0924
reviewed
Oct 28, 2026
3 tasks
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.
#️⃣연관된 이슈
main으로 바꿉니다🎯 해결하려는 문제가 무엇인가요?
운영진이 행사를 넣을 방법이 DB 직접 입력뿐입니다. 관리자 콘솔의 행사 등록·목록·수정 화면에 붙일 API가 없습니다.
❓ 왜 해결해야 하나요?
학생 앱의 행사 목록·상세·신청 API는 이미 있는데, 그 데이터를 만드는 쪽이 비어 있습니다. 공개 전환·삭제·신청 현황(다음 PR)도 이 등록·조회 API 위에 올라갑니다.
⭐ 어떻게 해결했나요?
POST /v1/admin/eventsGET /v1/admin/eventsPageResponseGET /v1/admin/events/{eventId}updatedAtPUT /v1/admin/events/{eventId}DB —
V22:events.fee_paid_only,event_questions.has_other_option(저장만 하고 학생 쪽 반영은 후속)검증 — 입력 규칙은 값을 만드는 객체가 직접 확인합니다
EVENT_INVALID_PERIOD(EventPeriod.of)EVENT_INVALID_CAPACITY(RecruitPolicy.of, 상시 모집은 정원 0으로 정리)EVENT_INVALID_QUESTION(EventQuestion.create)FILE_NOT_FOUND— 행사·파일이 다른 도메인이라AdminEventWriteUseCase가 조합 (AdminNoticeWriteUseCase와 같은 방식)수정 규칙
updatedAt(KST epoch 밀리초)을 돌려받아 초 단위로 비교, 다르면EVENT_UPDATE_CONFLICT(409). 공지와 같은 방식입니다EVENT_QUESTIONS_LOCKED. 답변이 질문 id·선택지 순서로 저장돼 있어서입니다. 안 바뀌었으면 교체하지 않아 질문 id가 유지됩니다EVENT_CAPACITY_BELOW_APPLICANTSevents행 값이 그대로라 DB가updated_at을 올리지 않습니다. 그래서 질문을 교체할 때updated_at을 직접 올립니다(touchUpdatedAt)서비스: 운영진 기능은
AdminEventService로 분리했습니다. 학생 앱의 공개 행사 조회는EventService에 그대로 둡니다.목록·상세 조합: 도메인에 응답과 1:1인 요약 객체를 두지 않았습니다. 서비스는 행사 페이지(
getEvents)와 신청자 수(getApplicantCounts)를 따로 돌려주고 컨트롤러가 조합하며, 모집 상태는 응답을 만들 때Event.calculateRecruitStatus로 계산합니다. 상세는 행사·질문·신청자 수 묶음(EventManageDetail)만 받습니다.🧩 이 PR의 한계 & 트레이드오프
@RequireDepartment만 붙이면 됩니다fee_paid_only·has_other_option은 저장만 합니다. 학생 신청 검증·학생 앱 노출은 후속 작업(학생 앱 행사 상세에 신청 조건 추가 및 학생회비 미납자 신청 차단 #190)입니다. 그 전까지 이 두 기능을 쓰는 행사는 #138의 공개 전환에서 막습니다event_end_at은 관리자에서 필수로 받지만 컬럼 NOT NULL 전환은 미뤘습니다⛓️ 기존 기능에 미치는 영향
api:admin-api가core:domain:event에 의존합니다Event.of(...)·EventQuestion.of(...)인자가 늘어 기존 테스트 호출부를 맞췄습니다🔀 Edge Case & 실패 시나리오
toCommand()) 검사해서, 잘못된 입력(400)이 동시 수정 충돌(409)보다 먼저 걸립니다null입니다📋 검토한 대안과 선택 이유
EventManageSummary): 처음엔 도메인에 뒀다가 뺐습니다. 응답 필드를 복사만 해서 화면 필드가 늘 때마다 두 곳을 고쳐야 하기 때문입니다(사물함LockerApplicationSummary를 뺀 것과 같은 이유)💬 리뷰 포인트
[c]EventServiceImpl.update의 검증 순서(동시 수정 → 형식 → 정원 → 질문)가 적절한지 봐주세요[c]질문 교체 시touchUpdatedAt네이티브 쿼리로updated_at을 올리는 방식 (엔티티에서updatable = false라서)[a]마이그레이션 V22는 main(V19)과 [Refactor/#133] 행사 target·강제 마감 제거 및 삭제된 행사 신청 내역 숨김 #134(V20·V21) 다음 번호입니다. 머지 직전에 다시 확인하겠습니다EventPeriodTest·RecruitPolicyTest·EventQuestionTest(입력 규칙),EventTest(등록·수정·정원 표시),AdminEventServiceImplTest(등록·상세·수정 규칙·목록)../gradlew build통과(bootstrap 통합 테스트는 R2 더미 환경변수로 실행)