Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Jul 29, 2025

Summary by CodeRabbit

  • New Features

    • Festival and place details now support multiple images instead of a single image.
    • Festival details include new fields: fee, phone, and site URL.
    • Enhanced error responses and DTOs with consistent snake_case JSON property naming.
    • Added new error status for "festival not found".
  • Improvements

    • Boolean fields such as "isLike" and "isOpen" now use explicit JSON property names for consistent API responses.
    • Place and festival types are now represented in English for improved clarity.
    • Related images and likes are loaded more efficiently in detail queries.
  • Bug Fixes

    • Corrected database mapping for festival images to associate with the correct festival ID.

ggamnunq added 4 commits July 29, 2025 23:32
 - 명소 상세조회 조회 쿼리 최적화
 - 이미지 반환값 단일값 -> 리스트 변경
 - 명소 타입 반환값 한글 -> 영어 변경
 - isSuccess가 is_success가 아닌 success로 표시되는 현상 해결
@ggamnunq ggamnunq self-assigned this Jul 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 29, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This change set refactors and extends the festival and place domain models, DTOs, repositories, and services. It introduces new entity relationships, updates JSON serialization strategies, adjusts DTO structures to support multiple images and explicit property naming, and enhances controller and service logic for festival details. Several repository methods and entity mappings are updated for correctness and efficiency.

Changes

Cohort / File(s) Change Summary
Festival Controller & Service Logic
.../festival/controller/FestivalController.kt, .../festival/service/FestivalQueryService.kt
Refactored festivalDetails endpoint to remove query params and implement service logic; added getFestivalDetails method to service.
Festival Entity & Relationships
.../festival/domain/Festival.kt, .../festival/domain/FestivalImage.kt
Added new fields (fee, phone, siteUrl) and one-to-many relationships to Festival; fixed foreign key mapping in FestivalImage.
Festival DTOs & Converters
.../festival/dto/FestivalDetailsDTO.kt, .../festival/dto/FestivalListResponseDTO.kt, .../festival/converter/FestivalConverter.kt
Changed DTOs to support multiple images, primitive types, added annotations for explicit JSON property names, and made a converter method public.
Festival Repository Layer
.../festival/repository/FestivalRepository.kt, .../festival/repository/FestivalLikesRepository.kt
Changed repository ID type to Long; added method for eager fetching of likes/images; added overload for finding likes by a set of festivals.
Place Entity & Relationships
.../place/domain/Place.kt
Replaced commented-out lists with active sets for likes and images in the Place entity.
Place DTOs & Converters
.../place/dto/PlaceResponseDTO.kt, .../place/dto/PlaceMapResponseDTO.kt, .../place/converter/PlaceDetailsConverter.kt
Updated DTOs to support lists of images, added JSON property annotations for booleans, and changed type/image handling in converters.
Place Repository Layer
.../place/repository/PlaceRepository.kt, .../place/repository/PlaceImageRepository.kt
Enhanced detail query to fetch likes and images; removed single-place image query method.
Place Service
.../place/service/PlaceQueryService.kt
Refactored to use new repository methods and entity relationships; removed unused repository parameter.
Place Type Enum
.../place/enums/PlaceType.kt
Added capitalEnglish property to enum for use in DTOs and converters.
API Payload & Error Handling
.../global/apiPayload/code/ErrorReasonDTO.kt, .../global/apiPayload/code/ErrorResponseDTO.kt, .../global/apiPayload/code/ReasonDTO.kt, .../global/apiPayload/exception/ApiResponse.kt, .../global/apiPayload/code/status/ErrorStatus.kt
Standardized JSON property naming with snake_case, added explicit property annotations, and introduced a new error status for festival not found.

Sequence Diagram(s)

sequenceDiagram
    participant Controller as FestivalController
    participant Service as FestivalQueryService
    participant Repo as FestivalRepository
    participant Auth as AuthService

    Controller->>Service: getFestivalDetails(festivalId)
    Service->>Auth: getCurrentUser()
    Service->>Repo: findByIdWithLikesAndImages(festivalId)
    Repo-->>Service: Festival (with likes & images)
    Service-->>Controller: FestivalDetailsDTO.DetailDto (wrapped in ApiResponse)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • 2025.07.28 #32: Introduced the initial FestivalController class and stubbed festivalDetails method, which is now being refactored and implemented in this PR.

Poem

In Busan’s code, the changes hop—
Festivals and places, we never stop!
Images now gather, not just one but more,
Likes and details, richer than before.
With snake_case fields and enums anew,
This rabbit cheers, “Great job, crew!” 🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5398a48 and 20beb1a.

📒 Files selected for processing (22)
  • src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/converter/FestivalConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/Festival.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/FestivalImage.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalDetailsDTO.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalListResponseDTO.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalLikesRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalRepository.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/service/FestivalQueryService.kt (4 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/converter/PlaceDetailsConverter.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/domain/Place.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceMapResponseDTO.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceResponseDTO.kt (5 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceImageRepository.kt (0 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/service/PlaceQueryService.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/code/ErrorReasonDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/code/ErrorResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/code/ReasonDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/code/status/ErrorStatus.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/exception/ApiResponse.kt (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ggamnunq ggamnunq merged commit c650a51 into main Jul 29, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants