Repository navigation
[FEAT#110]: 회원 탈퇴 - #111
[FEAT#110]: 회원 탈퇴 #111
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a user withdrawal (account deletion) feature that allows users to delete their accounts with proper cleanup of associated data. The implementation includes business logic to prevent withdrawal when users have active rentals, cancels pending/confirmed appointments, and anonymizes user data while preserving historical records.
- Adds soft deletion functionality with
isDeletedflag to User entity - Implements comprehensive appointment cleanup during withdrawal process
- Updates authentication and data access logic to handle deleted users
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| User.java | Adds isDeleted field and withdraw() method for soft deletion |
| UserService.java | Implements withdrawal business logic with appointment validation and cleanup |
| UserController.java | Adds DELETE endpoint for user withdrawal |
| UserRepository.java | Updates query to exclude deleted users from login lookup |
| BaseUserDto.java | Handles display of deleted users in API responses |
| AppointmentRepository.java | Adds queries for checking active appointments and finding cancelable ones |
| TokenService.java, JwtFilter.java | Updates authentication to reject deleted users |
| ChatRoomDto.java | Handles deleted users in chat room data |
| RedisService.java | Changes method visibility from private to public |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| this.weight = null; | ||
| this.fcmToken = null; | ||
| this.isPushEnabled = false; | ||
| this.email = this.email + "_deleted_" + LocalDate.now().toString(); |
There was a problem hiding this comment.
Missing import for LocalDate. The code uses LocalDate.now() but there's no import statement for java.time.LocalDate in the file.
📢 연관 이슈
#110
🦾 구현 내용
DEL /api/v1/user
회원 탈퇴 API를 만들었어요 탈퇴 시 다음과 같은 동작을 수행해요
이후 제품, 약속, 채팅 페이지에서 탈퇴한 사용자로 나타나도록 수정하였어요
✅ To-do
💭 논의 사항