-
Notifications
You must be signed in to change notification settings - Fork 5
hotfix/Payment : 예약 상태 null값 예약 완료로 수정 #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
| * @since 2025-04-10 | ||
| */ | ||
| @Getter | ||
| @NoArgsConstructor | ||
| @NoArgsConstructor(force = true) | ||
| @AllArgsConstructor | ||
| @Builder | ||
| @Entity | ||
|
|
@@ -86,8 +86,10 @@ public class Booking extends BaseEntity { | |
| /** | ||
| * 예약 상태 (예: RESERVED, CANCELLED 등) | ||
| */ | ||
| @Builder.Default | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 등) | ||
| */ | ||
|
|
@@ -100,7 +102,7 @@ public class Booking extends BaseEntity { | |
| * 예약 생성 시간 (결제 완료 시점) | ||
| */ | ||
| private LocalDateTime reservedAt; | ||
|
|
||
| /** | ||
| * 예약 상태를 취소로 변경합니다. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ public BookingListResponseDto getMyBookings(Long userId) { | |
| .paymentStatus(booking.getPaymentStatus()) | ||
| .reservedAt(booking.getReservedAt()) | ||
| .canCancel(canCancel(booking, today)) | ||
| .bookingStatus(booking.getBookingStatus()) | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BookingQueryService에 bookingStatus를 추가했습니다. 이 변경으로 인해 Booking 객체의 bookingStatus 필드를 조회하는 로직이 추가되었는데, 이 변경이 필요한 이유를 명확하게 설명해 주시면 좋겠습니다. 어떤 기능을 향상시키기 위해 추가되었는지 알려주세요. |
||
| .build(); | ||
|
|
||
| if (booking.getBookingStatus().equals(BookingStatus.RESERVED) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NoArgsConstructor에force = true옵션을 추가했습니다. 이 변경의 이유를 명시적으로 설명해주세요. 어떤 상황에서 이 옵션이 필요한지 설명이 필요합니다.