generated from pricelees/issue-pr-template
refactor: 회원의 예약 상세 조회 정보에 예약자 정보 반영
This commit is contained in:
parent
70b9c58c15
commit
c64e613a2b
@ -61,8 +61,23 @@ data class ReservationOverviewListResponse(
|
||||
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(
|
||||
val id: Long,
|
||||
val reserver: ReserverInfo,
|
||||
val user: UserContactResponse,
|
||||
val applicationDateTime: LocalDateTime,
|
||||
val payment: PaymentWithDetailResponse?,
|
||||
@ -74,6 +89,7 @@ fun ReservationEntity.toReservationDetailRetrieveResponse(
|
||||
): ReservationDetailResponse {
|
||||
return ReservationDetailResponse(
|
||||
id = this.id,
|
||||
reserver = this.toReserverInfo(),
|
||||
user = user,
|
||||
applicationDateTime = this.createdAt,
|
||||
payment = payment,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user