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,
|
||||
roomId = room.id!!,
|
||||
roomNumber = room.roomNumber,
|
||||
roomTypeId = roomType.id!!,
|
||||
roomTypeName = roomType.name,
|
||||
fromAt = stay.fromAt.toString(),
|
||||
checkinAt = booking.checkinAt?.toString(),
|
||||
|
||||
@@ -258,12 +258,10 @@ class Rooms(
|
||||
|
||||
private fun Room.toRoomResponse(): RoomResponse {
|
||||
val roomId = id ?: throw IllegalStateException("Room id is null")
|
||||
val roomTypeId = roomType.id ?: throw IllegalStateException("Room type id is null")
|
||||
return RoomResponse(
|
||||
id = roomId,
|
||||
roomNumber = roomNumber,
|
||||
floor = floor,
|
||||
roomTypeId = roomTypeId,
|
||||
roomTypeName = roomType.name,
|
||||
hasNfc = hasNfc,
|
||||
active = active,
|
||||
|
||||
@@ -6,7 +6,6 @@ data class RoomResponse(
|
||||
val id: UUID,
|
||||
val roomNumber: Int,
|
||||
val floor: Int?,
|
||||
val roomTypeId: UUID,
|
||||
val roomTypeName: String,
|
||||
val hasNfc: Boolean,
|
||||
val active: Boolean,
|
||||
|
||||
@@ -10,7 +10,6 @@ data class ActiveRoomStayResponse(
|
||||
val guestPhone: String?,
|
||||
val roomId: UUID,
|
||||
val roomNumber: Int,
|
||||
val roomTypeId: UUID,
|
||||
val roomTypeName: String,
|
||||
val fromAt: String,
|
||||
val checkinAt: String?,
|
||||
|
||||
Reference in New Issue
Block a user