/// Options: /// Date: 2026-08-15 00:54:06 /// 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: const std = @import("std"); /// const std = @import("std"); const ss = @import("servicestack"); pub const RoomType = enum { Single, Double, Queen, Twin, Suite, }; /// Booking Details pub const Booking = struct { id: i32 = 0, name: ?[]const u8 = null, roomType: ?RoomType = null, roomNumber: i32 = 0, bookingStartDate: ?[]const u8 = null, bookingEndDate: ?[]const u8 = null, cost: f64 = 0, // @References(typeof(Coupon)) couponId: ?[]const u8 = null, discount: ?Coupon = null, notes: ?[]const u8 = null, cancelled: ?bool = null, }; /// Create a new Booking // @Route("/bookings", "POST") // @ValidateRequest(Validator="HasRole(`Employee`)") pub const CreateBooking = struct { pub const ss_name = "CreateBooking"; pub const ss_verb = "POST"; pub const Response = ss.IdResponse; /// Name this Booking is for // @Validate(Validator="NotEmpty") name: ?[]const u8 = null, photo: ?[]const u8 = null, roomType: ?RoomType = null, // @Validate(Validator="GreaterThan(0)") roomNumber: i32 = 0, // @Validate(Validator="GreaterThan(0)") cost: f64 = 0, // @Required() bookingStartDate: ?[]const u8 = null, bookingEndDate: ?[]const u8 = null, notes: ?[]const u8 = null, couponId: ?[]const u8 = null, };