Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* @since 2025-04-10
*/
@Getter
@NoArgsConstructor
@NoArgsConstructor(force = true)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@NoArgsConstructorforce = true 옵션을 추가했습니다. 이 변경의 이유를 명시적으로 설명해주세요. 어떤 상황에서 이 옵션이 필요한지 설명이 필요합니다.

@AllArgsConstructor
@Builder
@Entity
Expand Down Expand Up @@ -86,8 +86,10 @@ public class Booking extends BaseEntity {
/**
* 예약 상태 (예: RESERVED, CANCELLED 등)
*/
@Builder.Default
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BookingStatus 필드를 추가하고 기본값을 RESERVED로 설정했습니다. 좋은 변경입니다. 하지만 데이터베이스의 columnDefinition을 VARCHAR(20)로 제한한 이유에 대한 설명이 필요합니다. 더 긴 문자열을 허용해야 하는 상황이 발생할 수도 있습니다.

@Enumerated(EnumType.STRING)
private BookingStatus bookingStatus;
@Column(columnDefinition = "VARCHAR(20)")
private BookingStatus bookingStatus = BookingStatus.RESERVED;
/**
* 결제 상태 (예: paid, failed 등)
*/
Expand All @@ -100,7 +102,7 @@ public class Booking extends BaseEntity {
* 예약 생성 시간 (결제 완료 시점)
*/
private LocalDateTime reservedAt;

/**
* 예약 상태를 취소로 변경합니다.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public BookingListResponseDto getMyBookings(Long userId) {
.paymentStatus(booking.getPaymentStatus())
.reservedAt(booking.getReservedAt())
.canCancel(canCancel(booking, today))
.bookingStatus(booking.getBookingStatus())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

BookingQueryService에 bookingStatus를 추가했습니다. 이 변경으로 인해 Booking 객체의 bookingStatus 필드를 조회하는 로직이 추가되었는데, 이 변경이 필요한 이유를 명확하게 설명해 주시면 좋겠습니다. 어떤 기능을 향상시키기 위해 추가되었는지 알려주세요.

.build();

if (booking.getBookingStatus().equals(BookingStatus.RESERVED)
Expand Down