/* Options: Date: 2024-12-04 19:10:31 SwiftVersion: 5.0 Version: 8.12 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://vue-vite-api.jamstacks.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: CreateBooking.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack /** * Create a new Booking */ // @Route("/bookings", "POST") // @ValidateRequest(Validator="HasRole(`Employee`)") public class CreateBooking : IReturn, Codable { public typealias Return = IdResponse /** * Name this Booking is for */ // @Validate(Validator="NotEmpty") public var name:String public var roomType:RoomType // @Validate(Validator="GreaterThan(0)") public var roomNumber:Int // @Validate(Validator="GreaterThan(0)") public var cost:Double public var bookingStartDate:Date public var bookingEndDate:Date? public var notes:String required public init(){} } // @DataContract public class IdResponse : Codable { // @DataMember(Order=1) public var id:String // @DataMember(Order=2) public var responseStatus:ResponseStatus required public init(){} } public enum RoomType : String, Codable { case Single case Double case Queen case Twin case Suite }