Skip to content

Conversation

@ckkim817
Copy link
Member

@ckkim817 ckkim817 commented Aug 4, 2025

💡 Issue

📄 Description

  • 장소 등록 API를 구현했습니다.

@ckkim817 ckkim817 requested a review from Copilot August 4, 2025 21:09
@ckkim817 ckkim817 self-assigned this Aug 4, 2025

This comment was marked as outdated.

@ckkim817 ckkim817 requested a review from Copilot August 4, 2025 21:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements a place registration API that allows users to apply for new spots to be added to the system. The implementation includes data models for spot applications and their options, along with validation and status tracking.

  • Adds entities and repositories for applying spots with options
  • Implements the spot application service and controller endpoint
  • Updates enums to support new price values and application status

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
ApplySpotEntity.java New entity for storing spot application data with status tracking
ApplySpotOptionEntity.java Junction entity linking spot applications to their selected options
ApplySpotRequest.java Request DTO with validation for spot application data
SpotService.java Implements spot application logic with option validation
SpotController.java Adds POST endpoint for spot applications
Various repositories New repositories for spot application data access
Enum updates Adds new status enum and updates existing price/feature enums

@Valid List<Feature> featureList,

@NotBlank(message = "recommendedMenu는 공백일 수 없습니다.")
@Size(min = 1, max = 30, message = "recommendedMenu는 1자 이상 30자 이하이어야 합니다.")
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The @SiZe validation constraint for recommendedMenu allows up to 30 characters, but the corresponding database column in ApplySpotEntity is defined with length = 50. This inconsistency could cause confusion - either update the validation to max = 50 or update the entity column length to 30.

Suggested change
@Size(min = 1, max = 30, message = "recommendedMenu는 1자 이상 30자 이하이어야 합니다.")
@Size(min = 1, max = 50, message = "recommendedMenu는 1자 이상 50자 이하이어야 합니다.")

Copilot uses AI. Check for mistakes.

public record ApplySpotRequest(
@NotBlank(message = "spotName은 공백일 수 없습니다.")
@Size(min = 1, max = 20, message = "spotName은 1자 이상 20자 이하이어야 합니다.")
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

The @SiZe validation constraint for spotName allows up to 20 characters, but the corresponding database column in ApplySpotEntity is defined with length = 30. This inconsistency could cause confusion - either update the validation to max = 30 or update the entity column length to 20.

Suggested change
@Size(min = 1, max = 20, message = "spotName은 1자 이상 20자 이하이어야 합니다.")
@Size(min = 1, max = 30, message = "spotName은 1자 이상 30자 이하이어야 합니다.")

Copilot uses AI. Check for mistakes.

applySpotOptionEntityList.add(
ApplySpotOptionEntity.builder()
.applySpotId(applySpotEntity.getId())
Copy link

Copilot AI Aug 4, 2025

Choose a reason for hiding this comment

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

Using applySpotEntity.getId() before the entity is persisted will return null, as the ID is generated only after saving to the database. Move the option processing logic after the applySpotRepository.save(applySpotEntity) call and retrieve the ID from the saved entity.

Suggested change
.applySpotId(applySpotEntity.getId())
.applySpotId(savedApplySpotEntity.getId())

Copilot uses AI. Check for mistakes.
@ckkim817 ckkim817 merged commit 02b4f45 into develop Aug 4, 2025
1 check passed
@ckkim817 ckkim817 deleted the feat/#110 branch August 4, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 장소 등록 API 구현 (v2.1.0)

2 participants