feat: 여행 리포트 삭제 API 추가(#98) #100
Merged
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.
📌 작업 내용 및 특이사항
✅ 여행 리포트 삭제 API 추가
memberId,tripReportId를 통해 특정 여행 리포트 삭제MemberQueryService.getValidMember()를 통해 멤버 삭제 여부 검증TripReportQueryService.getValidTripReport()를 통해 여행 리포트 소유자 및 삭제 여부 검증TripReport.updateDeletedAt()를 통해 deletedAt 필드에 현재 시각 저장 (소프트 딜리트)✅ 여행 리포트 목록 조회 비즈니스 로직 개선
TripReportRepository에findAllByMemberIdAndDeletedAtIsNullOrderByCreatedAtDesc메서드 추가TripReportQueryService.getTripReportsByMemberId()에서 리포지토리 메서드 변경✅ 여행 리포트 하드 딜리트 기능 추가
TripReportQueryRepository,TripReportQueryRepositoryAdapter에deleteAllByDeletedAtIsNotNull메서드 추가TripReportCommandService에hardDeleteTripReports메서드 추가HardDeleteFacade에 여행 리포트 하드 딜리트 삭제 로직 추가✅ 에러코드 추가
TripReportErrorCode에TRIP_REPORT_ALREADY_DELETED에러코드 추가✅ 정책 추가
TripReportPolicy에validateNotDeleted메서드 추가✅ 테스트
TripReportCommandServiceTest에DeleteTripReport단위 테스트 추가TripReportCommandService에HardDeleteTripReports단위 테스트 추가TripReportControllerIntegrationTest에DeleteTripReport통합 테스트 추가🌱 관련 이슈
🔍 참고사항(선택)
TripReportQueryService.getValidTripReport()에 삭제 검증 로직 추가LoadTripReportInfoResponse에여행 리포트 제목(title)추가📚 기타(선택)