Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Jul 29, 2025

Summary by CodeRabbit

  • New Features

    • Added support for sorting and filtering festival lists by status and sort type (default, like count, start date, end date).
    • Festival list responses now include the number of likes and whether the user has liked each festival.
    • Festival and place image fields now support cases where images may be missing.
  • Improvements

    • Festival and place lists now display image fields as optional, improving handling of missing images.
  • Other Changes

    • Introduced new festival status and sort type options for more flexible browsing.
    • Backend enhancements to support new festival query and conversion features.

@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 update introduces and implements the festival listing feature, including sorting and filtering by status. It adds new service, converter, and repository classes, updates DTOs and domain models to support likes and images, and modifies the controller to use these new capabilities. Enum classes for sorting and status are populated, and related place DTOs are adjusted for nullable images.

Changes

Cohort / File(s) Change Summary
Festival Controller & Endpoint Update
src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt
Controller now injects FestivalQueryService, implements festivalList endpoint, updates method signatures, and adds request parameters for sorting and status.
Festival Query Service & Logic
src/main/kotlin/busanVibe/busan/domain/festival/service/FestivalQueryService.kt
Adds a service class to fetch, sort, and convert festival data, aggregating images and likes, and returning DTOs.
Festival Converter
src/main/kotlin/busanVibe/busan/domain/festival/converter/FestivalConverter.kt
Introduces a converter to map Festival entities to DTOs, incorporating images, like counts, and user-like status.
Festival Domain Model
src/main/kotlin/busanVibe/busan/domain/festival/domain/Festival.kt
Adds a non-nullable status field with enum type and corresponding annotations to the Festival entity.
Festival DTOs
src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalListResponseDTO.kt
Makes img property nullable and adds likeCount to FestivalInfoDto.
Festival Sorting and Status Enums
src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalSortType.kt,
src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalStatus.kt
Populates previously empty enums with constants for sorting (DEFAULT, LIKE, START, END) and status (ALL, IN_PROGRESS, UPCOMING, COMPLETE).
Festival Repositories
src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalRepository.kt,
src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalImageRepository.kt,
src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalLikesRepository.kt
Adds repositories for festivals, images, and likes, each with methods for batch retrieval by festival list.
Place DTO and Service Adjustments
src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceResponseDTO.kt,
src/main/kotlin/busanVibe/busan/domain/place/service/PlaceQueryService.kt
Makes img property nullable in place DTO and updates service to assign null if no image exists instead of an empty string.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant FestivalController
    participant FestivalQueryService
    participant FestivalRepository
    participant FestivalImageRepository
    participant FestivalLikesRepository
    participant FestivalConverter

    Client->>FestivalController: GET /festivals?sort=&status=
    FestivalController->>FestivalQueryService: getFestivalList(sort, status)
    FestivalQueryService->>FestivalRepository: getFestivalList(status)
    FestivalQueryService->>FestivalImageRepository: findAllByFestivalIn(festivals)
    FestivalQueryService->>FestivalLikesRepository: findAllByFestivalIn(festivals)
    FestivalQueryService->>FestivalConverter: toInfoDto(...) (for each festival)
    FestivalQueryService-->>FestivalController: FestivalListResponseDTO.ListDto
    FestivalController-->>Client: ApiResponse<ListDto>
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • BusanVibe/back#32: Introduced the initial FestivalController with stub methods; this PR directly builds upon and extends the controller introduced there.

Poem

In Busan’s code, a festival blooms,
With images, likes, and status that zooms.
Repositories gather, converters align,
Sorting and filtering—features combine!
Now rabbits can hop through festivals with glee,
For the code’s more robust—just as it should be!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 4b51b07 and 058259b.

📒 Files selected for processing (12)
  • src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt (2 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/dto/FestivalListResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalSortType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalStatus.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalImageRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalLikesRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/repository/FestivalRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/service/FestivalQueryService.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/service/PlaceQueryService.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 5398a48 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