feat: 여행 리포트 기능 구현(#72) #87
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
여행 완료를 수행한 후, tripId를 이용해 지나온 여행 회고TripQueryService.getValidCompletedTrip()를 통해, 완료된 여행 검증 및 조회StudyLogQueryService.getStudyLogsSliceByTripId()를 통해, 학습 로그 목록 페이지네이션 조회MissionQueryService.countCompletedMissionsByTripId()를 통해, 완료된 미션 수 계산PomodoroQueryService.getTotalFocusHoursByTripId()를 통해, 총 집중 시간 계산✅ 여행 리포트 생성 API
TripReportCommandService.createTripReport()를 통해 여행 리포트 생성TripReportFactory.create()를 통해, 여행 리포트 엔티티 생성StudyLogQueryService.getValidStudyLogs()를 통해, 요청에 포함된 학습 로그 목록 조회 및 검증TripReportStudyLogCommandService.createTripReportStudyLogs()를 통해, 여행 리포트와 학습 로그 연결 생성TripReportStudyLogFactory.create()를 통해, 여행 리포트•학습 로그 연결 엔티티 생성✅ 여행 리포트 목록 조회 API
TripReportQueryService.getTripReportsByMemberId()를 통해, 모든 여행 리포트 조회 (생성일 내림차순 정렬)✅ 여행 리포트 상세 조회 API
TripReportQueryService.getValidTripReport()를 통해, 여행 리포트 조회 및 검증TripReportPolicy.validateOwner()를 통해, 여행 리포트 소유자 권한 검증StudyLogQueryService.getStudyLogsSliceByTripReportId()를 통해, 여행 리포트에 연결된 학습 로그 목록 페이지네이션 조회✅ 여행 리포트 이미지 업로드용 Presigned URL 발급 API
S3에 업로드하기 위한 Presigned PUT URL을 발급TripReportQueryService.getTripReport()를 통해, 여행 리포트 조회ImageService.presign()를 통해, S3 Presigned PUT URL 생성✅ 업로드된 여행 리포트 이미지 검증/확정 API
여행 리포트 이미지를 검증/확정ImageService.confirm()를 통해, 이미지 검증 및 최종 경로 이동TripReportCommandService.updateImageUrl()를 통해, 여행 리포트의 imageUrl 업데이트TripReport.updateImageUrl()를 통해, 엔티티의 이미지 URL 갱신✅ 에러 코드 추가
TripReportErrorCode추가TripErrorCode에 TRIP_NOT_COMPLETED 에러 코드 추가✅ 정책 추가
TripReportPolicy추가TripPolicy에 validateNotCompleted 메서드 추가StudyLogPolicy에 validateExistAll 메서드 추가✅ 리포지토리 메서드 추가
PomodoroQueryRepository,PomodoroQueryRepositoryAdapter에 sumFocusHoursByTripId 메서드 추가MissionQueryRepository,MissionQueryRepositoryAdapter에 countCompletedMissionsByTripId 메서드 추가StudyLogRepository,StudyLogJpaRepository,StudyLogRepositoryAdapter에 findAllByIdIn 메서드 추가StudyLogQueryRepository,StudyLogQueryRepositoryAdapter에 findSliceByTripReportIdOrderByCreatedAtDesc 메서드 추가✅ 서비스 메서드 추가
PomodoroQueryService에 getTotalFocusHoursByTripId 메서드 추가MissionQueryService에 countCompletedMissionsByTripId 메서드 추가TripQueryService에 getValidCompletedTrip 메서드 추가StudyLogQueryService에 getValidStudyLogs 메서드 추가StudyLogQueryService에 getStudyLogsSliceByTripReportId 메서드 추가✅ Application DTO 추가
TripRetrospectSummaryDTO 추가TripRetrospectDetailDTO 추가TripReportInfoDTO 추가TripReportsInfoDTO 추가TripReportDetailDTO 추가PresignedTripReportImageInfoDTO 추가✅ Presentation DTO 추가
CreateTripReportRequestDTO 추가PresignTripReportImageRequest,ConfirmTripReportImageRequestDTO 추가LoadTripRetrospectDetailResponseDTO 추가LoadTripReportsResponseDTO 추가LoadTripReportDetailResponseDTO 추가PresignedTripReportImageResponseDTO 추가✅ 테스트
PomodoroQueryServiceTest에GetTotalFocusHoursByTripId단위 테스트 추가StudyLogQueryServiceTest에GetStudyLogsByTripId단위 테스트 추가MissionQueryService에CountCompletedMissionsByTripId단위 테스트 추가TripQueryServiceTest에GetValidCompletedTrip단위 테스트 추가TripReportQueryServiceTest단위 테스트 추가TripReportCommandServiceTest단위 테스트 추가TripReportFixture,TripReportStudyLogFixture추가CreateTripReportRequestFixture추가PresignTripReportImageRequestFixture,ConfirmTripReportImageRequestFixture추가TripReportTestHelper추가TripReportControllerIntegrationTest통합 테스트 추가✅ Flyway 스크립트 작성
V5__create_trip_report_table.sql:trip_report테이블 생성 SQL 스크립트V6__create_trip_report_study_log_table.sql:trip_report_study_log테이블 생성 SQL 스크립트🌱 관련 이슈
🔍 참고사항(선택)
📚 기타(선택)