feat: 외부인 행사 신청·설문 응답 흐름 보강 및 설문 질문 archive 모델 도입#546
Merged
Conversation
기존 soft-delete는 "폼에서 빠짐"과 "삭제됨"을 동일 플래그로 표현하여 과거 응답이 가리키는 옵션이 폼 조회 시 사라져 미응답으로 보이는 문제가 있었음. archive 모델로 의미를 분리: - 응답이 1건이라도 있으면 archive (폼·신규 응답 검증에서 제외) - 응답이 없으면 hard delete (자식 옵션·행은 FK ON DELETE CASCADE) - V54 마이그레이션: deleted 컬럼 → archived_at 컬럼 교체, FK CASCADE 재정의 - SurveyQuestion/Option/Row: SoftDeletableEntity → BaseEntity, archive/unarchive/isArchived 추가 - 리포지토리: findByIdAndDeletedFalse → findByIdAndArchivedAtIsNull - 서비스: SurveyAnswerRepository.existsBy* 검사로 archive vs hard-delete 분기
archive 모델의 핵심 가치인 "과거 응답 보존"을 통계·응답 상세에 반영. - 통계: archived 옵션·행도 분포에 포함하여 과거 응답의 선택 분포가 누락되지 않도록 - 회원 응답 상세: archived 질문에 대한 과거 답변도 historical record로 유지 - 외부인 응답: archived 질문도 questionTypeMap에 포함하여 매핑 유지
Contributor
Test Results2 753 tests 2 749 ✅ 42s ⏱️ Results for commit 0d3cd33. |
This was referenced May 2, 2026
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.
Summary
archived_at기반 archive 모델로 교체하고, archived 데이터를 통계와 응답 상세에서 historical record로 노출주요 변경
외부인 응답·행사 이미지 (75efd87, aeff3f5, 20441ef, eb67138)
ExternalSurveyResponse) 응답을 포함설문 질문 archive 모델 (099e233, 9d599fb)
기존 soft-delete는 "폼에서 빠짐"과 "삭제됨"을 동일 플래그로 표현해 과거 응답이 가리키는 옵션이 폼 조회 시 사라지는 문제가 있었음. archive 모델로 의미를 분리해 응답이 1건이라도 있으면 archive(보존), 없으면 hard delete하도록 변경.
V54마이그레이션:deleted_*컬럼 →archived_at/by컬럼, FKON DELETE CASCADE재정의SurveyQuestion/Option/Row:SoftDeletableEntity→BaseEntity,archive/unarchive/isArchived도입findByIdAndArchivedAtIsNull등으로 변경,SurveyAnswerRepository.existsBy*로 archive vs hard-delete 분기알려진 한계
existsByQuestionId/SelectedOptionId/SelectedRowId로는 외부 응답의 참조를 검출하지 못함. 회원 응답 없이 외부 응답만 존재하는 질문/옵션/행은 hard delete될 수 있어 후속 PR에서 보강 예정.Test plan
./gradlew test)