generated from pricelees/issue-pr-template
[#34] 회원 / 인증 도메인 재정의 #43
@ -34,12 +34,12 @@ data class PaymentRetrieveResponse(
|
||||
val status: PaymentStatus,
|
||||
val requestedAt: OffsetDateTime,
|
||||
val approvedAt: OffsetDateTime,
|
||||
val detail: PaymentDetailResponse,
|
||||
val detail: PaymentDetailResponse?,
|
||||
val cancel: PaymentCancelDetailResponse?,
|
||||
)
|
||||
|
||||
fun PaymentEntity.toRetrieveResponse(
|
||||
detail: PaymentDetailResponse,
|
||||
detail: PaymentDetailResponse?,
|
||||
cancel: PaymentCancelDetailResponse?
|
||||
): PaymentRetrieveResponse {
|
||||
return PaymentRetrieveResponse(
|
||||
|
||||
@ -118,7 +118,7 @@ class ReservationService(
|
||||
|
||||
val reservation: ReservationEntity = findOrThrow(id)
|
||||
val user: UserContactRetrieveResponse = userService.findContactById(reservation.userId)
|
||||
val paymentDetail: PaymentRetrieveResponse = paymentService.findDetailByReservationId(id)
|
||||
val paymentDetail: PaymentRetrieveResponse? = paymentService.findDetailByReservationId(id)
|
||||
|
||||
return reservation.toReservationDetailRetrieveResponse(
|
||||
user = user,
|
||||
|
||||
@ -50,12 +50,12 @@ data class ReservationDetailRetrieveResponse(
|
||||
val id: Long,
|
||||
val user: UserContactRetrieveResponse,
|
||||
val applicationDateTime: LocalDateTime,
|
||||
val payment: PaymentRetrieveResponse,
|
||||
val payment: PaymentRetrieveResponse?,
|
||||
)
|
||||
|
||||
fun ReservationEntity.toReservationDetailRetrieveResponse(
|
||||
user: UserContactRetrieveResponse,
|
||||
payment: PaymentRetrieveResponse,
|
||||
payment: PaymentRetrieveResponse?,
|
||||
): ReservationDetailRetrieveResponse {
|
||||
return ReservationDetailRetrieveResponse(
|
||||
id = this.id,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user