generated from pricelees/issue-pr-template
[#44] 매장 기능 도입 #45
@ -61,8 +61,23 @@ data class ReservationOverviewListResponse(
|
|||||||
val reservations: List<ReservationOverviewResponse>
|
val reservations: List<ReservationOverviewResponse>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
data class ReserverInfo(
|
||||||
|
val name: String,
|
||||||
|
val contact: String,
|
||||||
|
val participantCount: Short,
|
||||||
|
val requirement: String
|
||||||
|
)
|
||||||
|
|
||||||
|
fun ReservationEntity.toReserverInfo() = ReserverInfo(
|
||||||
|
name = this.reserverName,
|
||||||
|
contact = this.reserverContact,
|
||||||
|
participantCount = this.participantCount,
|
||||||
|
requirement = this.requirement
|
||||||
|
)
|
||||||
|
|
||||||
data class ReservationDetailResponse(
|
data class ReservationDetailResponse(
|
||||||
val id: Long,
|
val id: Long,
|
||||||
|
val reserver: ReserverInfo,
|
||||||
val user: UserContactResponse,
|
val user: UserContactResponse,
|
||||||
val applicationDateTime: LocalDateTime,
|
val applicationDateTime: LocalDateTime,
|
||||||
val payment: PaymentWithDetailResponse?,
|
val payment: PaymentWithDetailResponse?,
|
||||||
@ -74,6 +89,7 @@ fun ReservationEntity.toReservationDetailRetrieveResponse(
|
|||||||
): ReservationDetailResponse {
|
): ReservationDetailResponse {
|
||||||
return ReservationDetailResponse(
|
return ReservationDetailResponse(
|
||||||
id = this.id,
|
id = this.id,
|
||||||
|
reserver = this.toReserverInfo(),
|
||||||
user = user,
|
user = user,
|
||||||
applicationDateTime = this.createdAt,
|
applicationDateTime = this.createdAt,
|
||||||
payment = payment,
|
payment = payment,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user