Skip to content

Conversation

@chaiminwoo0223
Copy link
Contributor

📌 작업 내용 및 특이사항

✅ 여행 리포트 삭제 API 추가

  • 사용자는 memberId, tripReportId를 통해 특정 여행 리포트 삭제
  • MemberQueryService.getValidMember()를 통해 멤버 삭제 여부 검증
  • TripReportQueryService.getValidTripReport()를 통해 여행 리포트 소유자 및 삭제 여부 검증
  • TripReport.updateDeletedAt()를 통해 deletedAt 필드에 현재 시각 저장 (소프트 딜리트)

✅ 여행 리포트 목록 조회 비즈니스 로직 개선

  • TripReportRepositoryfindAllByMemberIdAndDeletedAtIsNullOrderByCreatedAtDesc 메서드 추가
  • TripReportQueryService.getTripReportsByMemberId()에서 리포지토리 메서드 변경

✅ 여행 리포트 하드 딜리트 기능 추가

  • TripReportQueryRepository, TripReportQueryRepositoryAdapterdeleteAllByDeletedAtIsNotNull 메서드 추가
  • TripReportCommandServicehardDeleteTripReports 메서드 추가
  • HardDeleteFacade여행 리포트 하드 딜리트 삭제 로직 추가

✅ 에러코드 추가

  • TripReportErrorCodeTRIP_REPORT_ALREADY_DELETED 에러코드 추가

✅ 정책 추가

  • TripReportPolicyvalidateNotDeleted 메서드 추가

✅ 테스트

  • TripReportCommandServiceTestDeleteTripReport 단위 테스트 추가
  • TripReportCommandServiceHardDeleteTripReports 단위 테스트 추가
  • TripReportControllerIntegrationTestDeleteTripReport 통합 테스트 추가

🌱 관련 이슈


🔍 참고사항(선택)

  • TripReportQueryService.getValidTripReport()삭제 검증 로직 추가
  • LoadTripReportInfoResponse여행 리포트 제목(title) 추가

📚 기타(선택)

* feat: TripReport에 updateDeletedAt 메서드 추가
* feat: TripReportErrorCode에 TRIP_REPORT_ALREADY_DELETED 에러코드 추가
* feat: TripReportPolicy에 validateNotDeleted 메서드 추가
* feat: TripReportRepository에 findAllByMemberIdAndDeletedAtIsNullOrderByCreatedAtDesc 메서드 추가
* feat: TripReportQueryRepository, TripReportQueryRepositoryAdapter에 deleteAllByDeletedAtIsNotNull 메서드 추가
* feat: TripReportCommandService에 deleteTripReport 메서드 추가
* feat: TripReportCommandService에 hardDeleteTripReports 메서드 추가
* feat: TripFacade에 deleteTripReport 메서드 추가
* feat: TripReportController에 여행 리포트 삭제 API 추가

* refactor: TripReportQueryService.getValidTripReport()에 삭제 검증 정책 추가
* refactor: LoadTripReportInfoResponse에 여행 리포트 제목(title) 추가
* refactor: HardDeleteFacade에 여행 리포트 하드 딜리트 삭제 로직 추가

* test: TripReportCommandServiceTest에 DeleteTripReport 단위 테스트 추가
* test: TripReportCommandService에 HardDeleteTripReports 단위 테스트 추가
* test: TripReportControllerIntegrationTest에 DeleteTripReport 단위 테스트 추가
@chaiminwoo0223 chaiminwoo0223 self-assigned this Oct 17, 2025
@chaiminwoo0223 chaiminwoo0223 added ✨feature 구현, 개선 사항 관련 부분 🪄refactor 기능 개선 및 리팩토링 labels Oct 17, 2025
Copy link
Contributor

@hisonghy hisonghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨어요~
병합부탁드려요

@chaiminwoo0223 chaiminwoo0223 merged commit 415af86 into develop Oct 17, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨feature 구현, 개선 사항 관련 부분 🪄refactor 기능 개선 및 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨[FEAT]: 여행 리포트 삭제 API 추가

3 participants