/* Options: Date: 2024-12-04 19:14:36 Version: 8.12 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://vue-vite-api.jamstacks.net //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBooking.* //ExcludeTypes: //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.* import java.util.* import net.servicestack.client.* /** * Create a new Booking */ @Route(Path="/bookings", Verbs="POST") @ValidateRequest(Validator="HasRole(`Employee`)") open class CreateBooking : IReturn, ICreateDb { /** * Name this Booking is for */ @Validate(Validator="NotEmpty") var name:String? = null var roomType:RoomType? = null @Validate(Validator="GreaterThan(0)") var roomNumber:Int? = null @Validate(Validator="GreaterThan(0)") var cost:BigDecimal? = null var bookingStartDate:Date? = null var bookingEndDate:Date? = null var notes:String? = null companion object { private val responseType = IdResponse::class.java } override fun getResponseType(): Any? = CreateBooking.responseType } @DataContract open class IdResponse { @DataMember(Order=1) var id:String? = null @DataMember(Order=2) var responseStatus:ResponseStatus? = null } /** * Booking Details */ open class Booking : AuditBase() { var id:Int? = null var name:String? = null var roomType:RoomType? = null var roomNumber:Int? = null var bookingStartDate:Date? = null var bookingEndDate:Date? = null var cost:BigDecimal? = null var notes:String? = null var cancelled:Boolean? = null @DataMember(Order=1) var createdDate:Date? = null @DataMember(Order=2) @Required() var createdBy:String? = null @DataMember(Order=3) var modifiedDate:Date? = null @DataMember(Order=4) @Required() var modifiedBy:String? = null @DataMember(Order=5) var deletedDate:Date? = null @DataMember(Order=6) var deletedBy:String? = null } enum class RoomType { Single, Double, Queen, Twin, Suite, }