Remove roomTypeId from room responses
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 27s
This commit is contained in:
@@ -49,7 +49,6 @@ class RoomStays(
|
|||||||
guestPhone = guest?.phoneE164,
|
guestPhone = guest?.phoneE164,
|
||||||
roomId = room.id!!,
|
roomId = room.id!!,
|
||||||
roomNumber = room.roomNumber,
|
roomNumber = room.roomNumber,
|
||||||
roomTypeId = roomType.id!!,
|
|
||||||
roomTypeName = roomType.name,
|
roomTypeName = roomType.name,
|
||||||
fromAt = stay.fromAt.toString(),
|
fromAt = stay.fromAt.toString(),
|
||||||
checkinAt = booking.checkinAt?.toString(),
|
checkinAt = booking.checkinAt?.toString(),
|
||||||
|
|||||||
@@ -258,12 +258,10 @@ class Rooms(
|
|||||||
|
|
||||||
private fun Room.toRoomResponse(): RoomResponse {
|
private fun Room.toRoomResponse(): RoomResponse {
|
||||||
val roomId = id ?: throw IllegalStateException("Room id is null")
|
val roomId = id ?: throw IllegalStateException("Room id is null")
|
||||||
val roomTypeId = roomType.id ?: throw IllegalStateException("Room type id is null")
|
|
||||||
return RoomResponse(
|
return RoomResponse(
|
||||||
id = roomId,
|
id = roomId,
|
||||||
roomNumber = roomNumber,
|
roomNumber = roomNumber,
|
||||||
floor = floor,
|
floor = floor,
|
||||||
roomTypeId = roomTypeId,
|
|
||||||
roomTypeName = roomType.name,
|
roomTypeName = roomType.name,
|
||||||
hasNfc = hasNfc,
|
hasNfc = hasNfc,
|
||||||
active = active,
|
active = active,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ data class RoomResponse(
|
|||||||
val id: UUID,
|
val id: UUID,
|
||||||
val roomNumber: Int,
|
val roomNumber: Int,
|
||||||
val floor: Int?,
|
val floor: Int?,
|
||||||
val roomTypeId: UUID,
|
|
||||||
val roomTypeName: String,
|
val roomTypeName: String,
|
||||||
val hasNfc: Boolean,
|
val hasNfc: Boolean,
|
||||||
val active: Boolean,
|
val active: Boolean,
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ data class ActiveRoomStayResponse(
|
|||||||
val guestPhone: String?,
|
val guestPhone: String?,
|
||||||
val roomId: UUID,
|
val roomId: UUID,
|
||||||
val roomNumber: Int,
|
val roomNumber: Int,
|
||||||
val roomTypeId: UUID,
|
|
||||||
val roomTypeName: String,
|
val roomTypeName: String,
|
||||||
val fromAt: String,
|
val fromAt: String,
|
||||||
val checkinAt: String?,
|
val checkinAt: String?,
|
||||||
|
|||||||
Reference in New Issue
Block a user