[#30] 코드 구조 개선 #31

Merged
pricelees merged 31 commits from refactor/#30 into main 2025-08-06 10:16:08 +00:00
Showing only changes of commit 9be9b4919c - Show all commits

View File

@ -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() }
)