From c64e613a2ba939a5d574a103811af3ab4a675864 Mon Sep 17 00:00:00 2001 From: pricelees Date: Fri, 19 Sep 2025 18:03:56 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=ED=9A=8C=EC=9B=90=EC=9D=98=20?= =?UTF-8?q?=EC=98=88=EC=95=BD=20=EC=83=81=EC=84=B8=20=EC=A1=B0=ED=9A=8C=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=EC=97=90=20=EC=98=88=EC=95=BD=EC=9E=90=20?= =?UTF-8?q?=EC=A0=95=EB=B3=B4=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roomescape/reservation/web/ReservationDto.kt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/kotlin/roomescape/reservation/web/ReservationDto.kt b/src/main/kotlin/roomescape/reservation/web/ReservationDto.kt index 058b7f20..7990de1e 100644 --- a/src/main/kotlin/roomescape/reservation/web/ReservationDto.kt +++ b/src/main/kotlin/roomescape/reservation/web/ReservationDto.kt @@ -61,8 +61,23 @@ data class ReservationOverviewListResponse( val reservations: List ) +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,