/* Options: Date: 2026-08-15 00:51:37 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True IncludeTypes: CreateBooking.* //ExcludeTypes: //DefaultImports: */ package dtos import ( ss "github.com/ServiceStack/servicestack-go" "time" ) type RoomType string const ( RoomTypeSingle RoomType = "Single" RoomTypeDouble = "Double" RoomTypeQueen = "Queen" RoomTypeTwin = "Twin" RoomTypeSuite = "Suite" ) /** @description Booking Details */ type Booking struct { ss.AuditBase Id int `json:"id,omitempty"` Name string `json:"name"` RoomType RoomType `json:"roomType,omitempty"` RoomNumber int `json:"roomNumber,omitempty"` BookingStartDate time.Time `json:"bookingStartDate,omitempty"` BookingEndDate *time.Time `json:"bookingEndDate,omitempty"` Cost float64 `json:"cost,omitempty"` // @References("typeof(MyApp.ServiceModel.Coupon)") CouponId *string `json:"couponId,omitempty"` Discount Coupon `json:"discount"` Notes *string `json:"notes,omitempty"` Cancelled *bool `json:"cancelled,omitempty"` } /** @description Create a new Booking */ // @Route("/bookings", "POST") // @ValidateRequest(Validator="HasRole(`Employee`)") type CreateBooking struct { /** @description Name this Booking is for */ // @Validate(Validator="NotEmpty") Name string `json:"name"` Photo *string `json:"photo,omitempty"` RoomType RoomType `json:"roomType,omitempty"` // @Validate(Validator="GreaterThan(0)") RoomNumber int `json:"roomNumber,omitempty"` // @Validate(Validator="GreaterThan(0)") Cost float64 `json:"cost,omitempty"` // @Required() BookingStartDate time.Time `json:"bookingStartDate"` BookingEndDate *time.Time `json:"bookingEndDate,omitempty"` Notes *string `json:"notes,omitempty"` CouponId *string `json:"couponId,omitempty"` } func (CreateBooking) CreateResponse() (r ss.IdResponse) { return } func (CreateBooking) HttpMethod() string { return "POST" }