initial api setup

This commit is contained in:
androidlover5842
2026-01-26 19:57:06 +05:30
parent 3050702415
commit 2194502ad6
34 changed files with 882 additions and 3 deletions

View File

@@ -0,0 +1,54 @@
package com.android.trisolarispms.data.api
import com.google.firebase.auth.FirebaseAuth
import okhttp3.Interceptor
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
object ApiClient {
fun create(
auth: FirebaseAuth = FirebaseAuth.getInstance(),
baseUrl: String = ApiConstants.BASE_URL,
enableLogging: Boolean = true
): ApiService {
val tokenProvider = FirebaseAuthTokenProvider(auth)
val authInterceptor = Interceptor { chain ->
val original = chain.request()
val token = try {
kotlinx.coroutines.runBlocking { tokenProvider.token() }
} catch (e: Exception) {
null
}
val request = if (token.isNullOrBlank()) {
original
} else {
original.newBuilder()
.addHeader("Authorization", "Bearer $token")
.build()
}
chain.proceed(request)
}
val logging = HttpLoggingInterceptor().apply {
level = if (enableLogging) HttpLoggingInterceptor.Level.BODY else HttpLoggingInterceptor.Level.NONE
}
val client = OkHttpClient.Builder()
.addInterceptor(authInterceptor)
.addInterceptor(logging)
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.writeTimeout(30, TimeUnit.SECONDS)
.build()
return Retrofit.Builder()
.baseUrl(baseUrl)
.client(client)
.addConverterFactory(GsonConverterFactory.create())
.build()
.create(ApiService::class.java)
}
}

View File

@@ -0,0 +1,5 @@
package com.android.trisolarispms.data.api
object ApiConstants {
const val BASE_URL = "https://api.hoteltrisolaris.in/"
}

View File

@@ -0,0 +1,16 @@
package com.android.trisolarispms.data.api
interface ApiService :
AuthApi,
OrgApi,
PropertyApi,
RoomTypeApi,
RoomApi,
RoomImageApi,
BookingApi,
RoomStayApi,
CardApi,
GuestApi,
GuestDocumentApi,
TransportApi,
InboundEmailApi

View File

@@ -0,0 +1,15 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.AuthVerifyResponse
import com.android.trisolarispms.data.api.model.UserDto
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.POST
interface AuthApi {
@POST("auth/verify")
suspend fun verifyAuth(): Response<AuthVerifyResponse>
@GET("auth/me")
suspend fun me(): Response<UserDto>
}

View File

@@ -0,0 +1,5 @@
package com.android.trisolarispms.data.api
interface AuthTokenProvider {
suspend fun token(): String?
}

View File

@@ -0,0 +1,50 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.ActionResponse
import com.android.trisolarispms.data.api.model.BookingCancelRequest
import com.android.trisolarispms.data.api.model.BookingCheckInRequest
import com.android.trisolarispms.data.api.model.BookingCheckOutRequest
import com.android.trisolarispms.data.api.model.BookingNoShowRequest
import com.android.trisolarispms.data.api.model.BookingRoomStayCreateRequest
import com.android.trisolarispms.data.api.model.RoomStayDto
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST
import retrofit2.http.Path
interface BookingApi {
@POST("properties/{propertyId}/bookings/{bookingId}/check-in")
suspend fun checkIn(
@Path("propertyId") propertyId: String,
@Path("bookingId") bookingId: String,
@Body body: BookingCheckInRequest
): Response<ActionResponse>
@POST("properties/{propertyId}/bookings/{bookingId}/check-out")
suspend fun checkOut(
@Path("propertyId") propertyId: String,
@Path("bookingId") bookingId: String,
@Body body: BookingCheckOutRequest
): Response<ActionResponse>
@POST("properties/{propertyId}/bookings/{bookingId}/cancel")
suspend fun cancelBooking(
@Path("propertyId") propertyId: String,
@Path("bookingId") bookingId: String,
@Body body: BookingCancelRequest
): Response<ActionResponse>
@POST("properties/{propertyId}/bookings/{bookingId}/no-show")
suspend fun noShow(
@Path("propertyId") propertyId: String,
@Path("bookingId") bookingId: String,
@Body body: BookingNoShowRequest
): Response<ActionResponse>
@POST("properties/{propertyId}/bookings/{bookingId}/room-stays")
suspend fun preAssignRoomStay(
@Path("propertyId") propertyId: String,
@Path("bookingId") bookingId: String,
@Body body: BookingRoomStayCreateRequest
): Response<RoomStayDto>
}

View File

@@ -0,0 +1,39 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.ActionResponse
import com.android.trisolarispms.data.api.model.CardDto
import com.android.trisolarispms.data.api.model.CardIssueRequest
import com.android.trisolarispms.data.api.model.CardPrepareRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
interface CardApi {
@POST("properties/{propertyId}/room-stays/{roomStayId}/cards/prepare")
suspend fun prepareCard(
@Path("propertyId") propertyId: String,
@Path("roomStayId") roomStayId: String,
@Body body: CardPrepareRequest
): Response<CardDto>
@POST("properties/{propertyId}/room-stays/{roomStayId}/cards")
suspend fun issueCard(
@Path("propertyId") propertyId: String,
@Path("roomStayId") roomStayId: String,
@Body body: CardIssueRequest
): Response<CardDto>
@GET("properties/{propertyId}/room-stays/{roomStayId}/cards")
suspend fun listCards(
@Path("propertyId") propertyId: String,
@Path("roomStayId") roomStayId: String
): Response<List<CardDto>>
@POST("properties/{propertyId}/room-stays/cards/{cardId}/revoke")
suspend fun revokeCard(
@Path("propertyId") propertyId: String,
@Path("cardId") cardId: String
): Response<ActionResponse>
}

View File

@@ -0,0 +1,13 @@
package com.android.trisolarispms.data.api
import com.google.firebase.auth.FirebaseAuth
import kotlinx.coroutines.tasks.await
class FirebaseAuthTokenProvider(
private val auth: FirebaseAuth
) : AuthTokenProvider {
override suspend fun token(): String? {
val user = auth.currentUser ?: return null
return user.getIdToken(false).await().token
}
}

View File

@@ -0,0 +1,42 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.GuestDto
import com.android.trisolarispms.data.api.model.GuestRatingDto
import com.android.trisolarispms.data.api.model.GuestRatingRequest
import com.android.trisolarispms.data.api.model.GuestVehicleDto
import com.android.trisolarispms.data.api.model.GuestVehicleRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
import retrofit2.http.Query
interface GuestApi {
@GET("properties/{propertyId}/guests/search")
suspend fun searchGuests(
@Path("propertyId") propertyId: String,
@Query("phone") phone: String? = null,
@Query("vehicleNumber") vehicleNumber: String? = null
): Response<List<GuestDto>>
@POST("properties/{propertyId}/guests/{guestId}/vehicles")
suspend fun addGuestVehicle(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String,
@Body body: GuestVehicleRequest
): Response<GuestVehicleDto>
@POST("properties/{propertyId}/guests/{guestId}/ratings")
suspend fun addGuestRating(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String,
@Body body: GuestRatingRequest
): Response<GuestRatingDto>
@GET("properties/{propertyId}/guests/{guestId}/ratings")
suspend fun listGuestRatings(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String
): Response<List<GuestRatingDto>>
}

View File

@@ -0,0 +1,39 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.GuestDocumentDto
import okhttp3.MultipartBody
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Streaming
interface GuestDocumentApi {
@Multipart
@POST("properties/{propertyId}/guests/{guestId}/documents")
suspend fun uploadGuestDocument(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String,
@Part file: MultipartBody.Part,
@Part("docType") docType: RequestBody,
@Part("bookingId") bookingId: RequestBody
): Response<GuestDocumentDto>
@GET("properties/{propertyId}/guests/{guestId}/documents")
suspend fun listGuestDocuments(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String
): Response<List<GuestDocumentDto>>
@Streaming
@GET("properties/{propertyId}/guests/{guestId}/documents/{documentId}/file")
suspend fun getGuestDocumentFile(
@Path("propertyId") propertyId: String,
@Path("guestId") guestId: String,
@Path("documentId") documentId: String
): Response<ResponseBody>
}

View File

@@ -0,0 +1,30 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.ActionResponse
import okhttp3.MultipartBody
import okhttp3.RequestBody
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Streaming
interface InboundEmailApi {
@Streaming
@GET("properties/{propertyId}/inbound-emails/{emailId}/file")
suspend fun getInboundEmailFile(
@Path("propertyId") propertyId: String,
@Path("emailId") emailId: String
): Response<ResponseBody>
@Multipart
@POST("properties/{propertyId}/inbound-emails/manual")
suspend fun uploadInboundEmail(
@Path("propertyId") propertyId: String,
@Part file: MultipartBody.Part,
@Part("sourceBookingId") sourceBookingId: RequestBody?
): Response<ActionResponse>
}

View File

@@ -0,0 +1,17 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.OrgCreateRequest
import com.android.trisolarispms.data.api.model.OrgDto
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path
interface OrgApi {
@POST("orgs")
suspend fun createOrg(@Body body: OrgCreateRequest): Response<OrgDto>
@GET("orgs/{orgId}")
suspend fun getOrg(@Path("orgId") orgId: String): Response<OrgDto>
}

View File

@@ -0,0 +1,51 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.PropertyCreateRequest
import com.android.trisolarispms.data.api.model.PropertyDto
import com.android.trisolarispms.data.api.model.PropertyUpdateRequest
import com.android.trisolarispms.data.api.model.UserDto
import com.android.trisolarispms.data.api.model.UserRolesUpdateRequest
import com.android.trisolarispms.data.api.model.ActionResponse
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
interface PropertyApi {
@POST("orgs/{orgId}/properties")
suspend fun createProperty(
@Path("orgId") orgId: String,
@Body body: PropertyCreateRequest
): Response<PropertyDto>
@GET("orgs/{orgId}/properties")
suspend fun listProperties(@Path("orgId") orgId: String): Response<List<PropertyDto>>
@PUT("properties/{propertyId}")
suspend fun updateProperty(
@Path("propertyId") propertyId: String,
@Body body: PropertyUpdateRequest
): Response<PropertyDto>
@GET("orgs/{orgId}/users")
suspend fun listOrgUsers(@Path("orgId") orgId: String): Response<List<UserDto>>
@GET("properties/{propertyId}/users")
suspend fun listPropertyUsers(@Path("propertyId") propertyId: String): Response<List<UserDto>>
@PUT("properties/{propertyId}/users/{userId}/roles")
suspend fun updateUserRoles(
@Path("propertyId") propertyId: String,
@Path("userId") userId: String,
@Body body: UserRolesUpdateRequest
): Response<ActionResponse>
@DELETE("properties/{propertyId}/users/{userId}")
suspend fun deletePropertyUser(
@Path("propertyId") propertyId: String,
@Path("userId") userId: String
): Response<ActionResponse>
}

View File

@@ -0,0 +1,51 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.AvailabilityResponse
import com.android.trisolarispms.data.api.model.RoomBoardDto
import com.android.trisolarispms.data.api.model.RoomCreateRequest
import com.android.trisolarispms.data.api.model.RoomDto
import com.android.trisolarispms.data.api.model.RoomUpdateRequest
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
import retrofit2.http.Query
import retrofit2.http.Streaming
interface RoomApi {
@GET("properties/{propertyId}/rooms")
suspend fun listRooms(@Path("propertyId") propertyId: String): Response<List<RoomDto>>
@POST("properties/{propertyId}/rooms")
suspend fun createRoom(
@Path("propertyId") propertyId: String,
@Body body: RoomCreateRequest
): Response<RoomDto>
@PUT("properties/{propertyId}/rooms/{roomId}")
suspend fun updateRoom(
@Path("propertyId") propertyId: String,
@Path("roomId") roomId: String,
@Body body: RoomUpdateRequest
): Response<RoomDto>
@GET("properties/{propertyId}/rooms/board")
suspend fun getRoomBoard(@Path("propertyId") propertyId: String): Response<RoomBoardDto>
@Streaming
@GET("properties/{propertyId}/rooms/board/stream")
suspend fun streamRoomBoard(@Path("propertyId") propertyId: String): Response<ResponseBody>
@GET("properties/{propertyId}/rooms/availability")
suspend fun getRoomAvailability(@Path("propertyId") propertyId: String): Response<AvailabilityResponse>
@GET("properties/{propertyId}/rooms/availability-range")
suspend fun getRoomAvailabilityRange(
@Path("propertyId") propertyId: String,
@Query("from") from: String,
@Query("to") to: String
): Response<AvailabilityResponse>
}

View File

@@ -0,0 +1,38 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.ImageDto
import okhttp3.MultipartBody
import okhttp3.ResponseBody
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Multipart
import retrofit2.http.POST
import retrofit2.http.Part
import retrofit2.http.Path
import retrofit2.http.Query
import retrofit2.http.Streaming
interface RoomImageApi {
@GET("properties/{propertyId}/rooms/{roomId}/images")
suspend fun listRoomImages(
@Path("propertyId") propertyId: String,
@Path("roomId") roomId: String
): Response<List<ImageDto>>
@Multipart
@POST("properties/{propertyId}/rooms/{roomId}/images")
suspend fun uploadRoomImage(
@Path("propertyId") propertyId: String,
@Path("roomId") roomId: String,
@Part file: MultipartBody.Part
): Response<ImageDto>
@Streaming
@GET("properties/{propertyId}/rooms/{roomId}/images/{imageId}/file")
suspend fun getRoomImageFile(
@Path("propertyId") propertyId: String,
@Path("roomId") roomId: String,
@Path("imageId") imageId: String,
@Query("size") size: String? = null
): Response<ResponseBody>
}

View File

@@ -0,0 +1,17 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.RoomChangeRequest
import com.android.trisolarispms.data.api.model.RoomStayDto
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.POST
import retrofit2.http.Path
interface RoomStayApi {
@POST("properties/{propertyId}/room-stays/{roomStayId}/change-room")
suspend fun changeRoom(
@Path("propertyId") propertyId: String,
@Path("roomStayId") roomStayId: String,
@Body body: RoomChangeRequest
): Response<RoomStayDto>
}

View File

@@ -0,0 +1,37 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.ActionResponse
import com.android.trisolarispms.data.api.model.RoomTypeCreateRequest
import com.android.trisolarispms.data.api.model.RoomTypeDto
import com.android.trisolarispms.data.api.model.RoomTypeUpdateRequest
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
import retrofit2.http.Path
interface RoomTypeApi {
@POST("properties/{propertyId}/room-types")
suspend fun createRoomType(
@Path("propertyId") propertyId: String,
@Body body: RoomTypeCreateRequest
): Response<RoomTypeDto>
@GET("properties/{propertyId}/room-types")
suspend fun listRoomTypes(@Path("propertyId") propertyId: String): Response<List<RoomTypeDto>>
@PUT("properties/{propertyId}/room-types/{roomTypeId}")
suspend fun updateRoomType(
@Path("propertyId") propertyId: String,
@Path("roomTypeId") roomTypeId: String,
@Body body: RoomTypeUpdateRequest
): Response<RoomTypeDto>
@DELETE("properties/{propertyId}/room-types/{roomTypeId}")
suspend fun deleteRoomType(
@Path("propertyId") propertyId: String,
@Path("roomTypeId") roomTypeId: String
): Response<ActionResponse>
}

View File

@@ -0,0 +1,11 @@
package com.android.trisolarispms.data.api
import com.android.trisolarispms.data.api.model.TransportModeDto
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.Path
interface TransportApi {
@GET("properties/{propertyId}/transport-modes")
suspend fun listTransportModes(@Path("propertyId") propertyId: String): Response<List<TransportModeDto>>
}

View File

@@ -0,0 +1,7 @@
package com.android.trisolarispms.data.api.model
data class AuthVerifyResponse(
val user: UserDto? = null,
val orgId: String? = null,
val propertyId: String? = null
)

View File

@@ -0,0 +1,58 @@
package com.android.trisolarispms.data.api.model
data class BookingCheckInRequest(
val roomIds: List<String>,
val checkInAt: String? = null,
val transportMode: String? = null,
val transportVehicleNumber: String? = null,
val notes: String? = null,
val adultCount: Int? = null,
val childCount: Int? = null,
val maleCount: Int? = null,
val femaleCount: Int? = null,
val totalGuestCount: Int? = null
)
data class BookingCheckOutRequest(
val checkOutAt: String? = null,
val notes: String? = null
)
data class BookingCancelRequest(
val cancelledAt: String? = null,
val reason: String? = null
)
data class BookingNoShowRequest(
val noShowAt: String? = null,
val reason: String? = null
)
data class BookingRoomStayCreateRequest(
val roomId: String,
val fromAt: String,
val toAt: String,
val notes: String? = null
)
// Room Stays
data class RoomStayCreateRequest(
val roomId: String,
val guestId: String? = null,
val checkIn: String? = null,
val checkOut: String? = null
)
data class RoomStayDto(
val id: String? = null,
val bookingId: String? = null,
val roomId: String? = null,
val status: String? = null
)
data class RoomChangeRequest(
val newRoomId: String,
val movedAt: String? = null,
val idempotencyKey: String
)

View File

@@ -0,0 +1,18 @@
package com.android.trisolarispms.data.api.model
data class CardPrepareRequest(
val expiresAt: String? = null
)
data class CardIssueRequest(
val cardId: String,
val cardIndex: Int,
val issuedAt: String? = null,
val expiresAt: String
)
data class CardDto(
val id: String? = null,
val cardNumber: String? = null,
val status: String? = null
)

View File

@@ -0,0 +1,6 @@
package com.android.trisolarispms.data.api.model
data class ActionResponse(
val success: Boolean? = null,
val message: String? = null
)

View File

@@ -0,0 +1,37 @@
package com.android.trisolarispms.data.api.model
data class GuestDto(
val id: String? = null,
val name: String? = null,
val phone: String? = null,
val email: String? = null
)
data class GuestVehicleRequest(
val vehicleNumber: String
)
data class GuestVehicleDto(
val id: String? = null,
val vehicleNumber: String? = null
)
data class GuestRatingRequest(
val bookingId: String,
val score: String,
val notes: String? = null
)
data class GuestRatingDto(
val id: String? = null,
val score: String? = null,
val notes: String? = null,
val createdAt: String? = null
)
data class GuestDocumentDto(
val id: String? = null,
val type: String? = null,
val fileName: String? = null,
val createdAt: String? = null
)

View File

@@ -0,0 +1,14 @@
package com.android.trisolarispms.data.api.model
data class OrgCreateRequest(
val name: String,
val emailAliases: List<String>? = null,
val allowedTransportModes: List<String>? = null
)
data class OrgDto(
val id: String? = null,
val name: String? = null,
val emailAliases: List<String>? = null,
val allowedTransportModes: List<String>? = null
)

View File

@@ -0,0 +1,38 @@
package com.android.trisolarispms.data.api.model
data class PropertyCreateRequest(
val code: String,
val name: String,
val addressText: String? = null,
val timezone: String? = null,
val currency: String? = null,
val emailAddresses: List<String>? = null,
val otaAliases: List<String>? = null,
val allowedTransportModes: List<String>? = null
)
data class PropertyUpdateRequest(
val code: String? = null,
val name: String? = null,
val addressText: String? = null,
val timezone: String? = null,
val currency: String? = null,
val active: Boolean? = null,
val emailAddresses: List<String>? = null,
val otaAliases: List<String>? = null,
val allowedTransportModes: List<String>? = null
)
data class PropertyDto(
val id: String? = null,
val orgId: String? = null,
val code: String? = null,
val name: String? = null,
val addressText: String? = null,
val timezone: String? = null,
val currency: String? = null,
val active: Boolean? = null,
val emailAddresses: List<String>? = null,
val otaAliases: List<String>? = null,
val allowedTransportModes: List<String>? = null
)

View File

@@ -0,0 +1,62 @@
package com.android.trisolarispms.data.api.model
data class RoomCreateRequest(
val roomNumber: String,
val floor: String? = null,
val roomTypeId: String,
val hasNfc: Boolean? = null,
val active: Boolean? = null,
val maintenance: Boolean? = null,
val notes: String? = null
)
data class RoomUpdateRequest(
val roomNumber: String,
val floor: String? = null,
val roomTypeId: String,
val hasNfc: Boolean? = null,
val active: Boolean? = null,
val maintenance: Boolean? = null,
val notes: String? = null
)
data class RoomDto(
val id: String? = null,
val roomNumber: String? = null,
val roomTypeId: String? = null,
val floor: String? = null,
val hasNfc: Boolean? = null,
val active: Boolean? = null,
val maintenance: Boolean? = null,
val notes: String? = null
)
data class RoomBoardDto(
val items: List<RoomBoardItemDto> = emptyList()
)
data class RoomBoardItemDto(
val roomId: String? = null,
val status: String? = null,
val roomStayId: String? = null,
val guestName: String? = null
)
data class AvailabilityResponse(
val rooms: List<RoomAvailabilityDto> = emptyList()
)
data class RoomAvailabilityDto(
val roomId: String? = null,
val date: String? = null,
val available: Boolean? = null,
val rate: Double? = null
)
// Images
data class ImageDto(
val id: String? = null,
val url: String? = null,
val fileName: String? = null
)

View File

@@ -0,0 +1,26 @@
package com.android.trisolarispms.data.api.model
data class RoomTypeCreateRequest(
val code: String,
val name: String,
val maxAdults: Int? = null,
val maxChildren: Int? = null,
val otaAliases: List<String>? = null
)
data class RoomTypeUpdateRequest(
val code: String? = null,
val name: String? = null,
val maxAdults: Int? = null,
val maxChildren: Int? = null,
val otaAliases: List<String>? = null
)
data class RoomTypeDto(
val id: String? = null,
val code: String? = null,
val name: String? = null,
val maxAdults: Int? = null,
val maxChildren: Int? = null,
val otaAliases: List<String>? = null
)

View File

@@ -0,0 +1,6 @@
package com.android.trisolarispms.data.api.model
data class TransportModeDto(
val id: String? = null,
val name: String? = null
)

View File

@@ -0,0 +1,13 @@
package com.android.trisolarispms.data.api.model
data class UserDto(
val id: String? = null,
val name: String? = null,
val email: String? = null,
val phone: String? = null,
val roles: List<String>? = null
)
data class UserRolesUpdateRequest(
val roles: List<String>
)