Feature/#213 회원 강제탈퇴 기능수정#214
Open
sjmoon00 wants to merge 4 commits into
Hidden character warning
The head ref may contain hidden characters: "Feature/#213-\ud68c\uc6d0_\uac15\uc81c\ud0c8\ud1f4_\uae30\ub2a5\uc218\uc815"
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
관리자 강제탈퇴 API에 “탈퇴 사유(필수) / 기타사항(선택)” 입력을 추가하고, soft-delete로 인해 사유가 사라지는 문제를 방지하기 위해 별도의 이력 테이블에 영구 저장하도록 확장한 PR입니다.
Changes:
DELETE /admin/members/{memberId}가 request body(ForceDeleteMemberRequest)를 받아 탈퇴 사유/기타사항을 처리하도록 변경MemberWithdrawalReason+MemberWithdrawalHistory(엔티티/리포지토리) 신설 및 서비스 로직에 “이력 저장 → soft-delete” 플로우 추가- 관련 RestDocs/서비스 테스트 갱신 및 유효성(500자 초과) 케이스 추가
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/com/opus/opus/restdocs/docs/MemberApiDocsTest.java | 강제탈퇴 API가 body를 받도록 RestDocs 시나리오/필드 문서화 및 detail 길이 검증 케이스 추가 |
| src/test/java/com/opus/opus/member/application/MemberCommandServiceTest.java | 강제탈퇴 시 member 숨김 + 이력 저장 검증 테스트 추가 및 시그니처 변경 반영 |
| src/main/resources/schema.sql | member_withdrawal_history 테이블 추가 (사유/기타사항 영구 저장) |
| src/main/java/com/opus/opus/modules/member/domain/MemberWithdrawalReason.java | 탈퇴 사유 enum 신설 |
| src/main/java/com/opus/opus/modules/member/domain/MemberWithdrawalHistory.java | 탈퇴 이력 엔티티 신설 |
| src/main/java/com/opus/opus/modules/member/domain/dao/MemberWithdrawalHistoryRepository.java | 탈퇴 이력 저장용 JPA 리포지토리 신설 |
| src/main/java/com/opus/opus/modules/member/application/MemberCommandService.java | 관리자 강제탈퇴 시 이력 저장 후 삭제 처리로 변경 |
| src/main/java/com/opus/opus/modules/member/application/dto/request/ForceDeleteMemberRequest.java | 강제탈퇴 요청 DTO 및 validation 추가 (reason 필수, detail 500자 제한) |
| src/main/java/com/opus/opus/modules/member/api/MemberController.java | 강제탈퇴 엔드포인트가 @Valid @RequestBody를 받도록 변경 |
| src/main/java/com/opus/opus/modules/contest/api/ContestTeamSubmissionController.java | 메서드 시그니처 포맷팅 정리(동작 변경 없음) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+185
to
+187
| public ResponseEntity<Void> forceDeleteMember(@PathVariable final Long memberId, | ||
| @Valid @RequestBody final ForceDeleteMemberRequest request) { | ||
| memberCommandService.withdrawByAdmin(memberId, request); |
Comment on lines
+302
to
+304
| `member_id` bigint NOT NULL, | ||
| `reason` enum('FRAUDULENT_USE','DUPLICATE_ACCOUNT') NOT NULL, | ||
| `detail` varchar(500) DEFAULT NULL, |
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.
🔥 연관된 이슈
close: #213
📜 작업 내용
DELETE /admin/members/{memberId}API가 이를 받아 저장하도록 수정했습니다.MemberWithdrawalReason(FRAUDULENT_USE,DUPLICATE_ACCOUNT) enum과MemberWithdrawalHistory엔티티/리포지토리를 신설해 탈퇴 사유를 영구 저장합니다. (Member는 강제탈퇴 시 soft-delete되어 기본 조회에서 숨겨지므로, 별도 저장 없이는 사유가 사라집니다)ForceDeleteMemberRequest(reason필수,detail500자 이하)를 request body로 추가했습니다.💬 리뷰 요구사항