/* Options: Date: 2024-12-22 21:41:14 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //Package: //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBooking.* //ExcludeTypes: //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,java.io.InputStream,net.servicestack.client.* */ import java.math.* import java.util.* import java.io.InputStream 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") open var name:String? = null open var photo:String? = null open var roomType:RoomType? = null @Validate(Validator="GreaterThan(0)") open var roomNumber:Int? = null @Validate(Validator="GreaterThan(0)") open var cost:BigDecimal? = null @Required() open var bookingStartDate:Date? = null open var bookingEndDate:Date? = null open var notes:String? = null open var couponId:String? = null companion object { private val responseType = IdResponse::class.java } override fun getResponseType(): Any? = CreateBooking.responseType } @DataContract open class IdResponse { @DataMember(Order=1) open var id:String? = null @DataMember(Order=2) open var responseStatus:ResponseStatus? = null } /** * Booking Details */ open class Booking : AuditBase() { open var id:Int? = null open var name:String? = null open var roomType:RoomType? = null open var roomNumber:Int? = null open var bookingStartDate:Date? = null open var bookingEndDate:Date? = null open var cost:BigDecimal? = null @References(Type=Coupon::class) open var couponId:String? = null open var discount:Coupon? = null open var notes:String? = null open var cancelled:Boolean? = null } enum class RoomType { Single, Double, Queen, Twin, Suite, }