generated from pricelees/issue-pr-template
[#30] 코드 구조 개선 #31
@ -57,6 +57,8 @@ data class MyReservationRetrieveListResponse(
|
||||
val reservations: List<MyReservationRetrieveResponse>
|
||||
)
|
||||
|
||||
fun List<MyReservationRetrieveResponse>.toRetrieveListResponse() = MyReservationRetrieveListResponse(this)
|
||||
|
||||
data class ReservationRetrieveResponse(
|
||||
val id: Long,
|
||||
val date: LocalDate,
|
||||
@ -85,3 +87,7 @@ fun ReservationEntity.toRetrieveResponse(): ReservationRetrieveResponse = Reserv
|
||||
data class ReservationRetrieveListResponse(
|
||||
val reservations: List<ReservationRetrieveResponse>
|
||||
)
|
||||
|
||||
fun List<ReservationEntity>.toRetrieveListResponse()= ReservationRetrieveListResponse(
|
||||
this.map { it.toRetrieveResponse() }
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user