/* Options: Date: 2024-12-22 21:13:18 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: CreateBooking.* //ExcludeTypes: //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.*; public class dtos { /** * Create a new Booking */ @Route(Path="/bookings", Verbs="POST") @ValidateRequest(Validator="HasRole(`Employee`)") public static class CreateBooking implements IReturn, ICreateDb { /** * Name this Booking is for */ @Validate(Validator="NotEmpty") public String name = null; public String photo = null; public RoomType roomType = null; @Validate(Validator="GreaterThan(0)") public Integer roomNumber = null; @Validate(Validator="GreaterThan(0)") public BigDecimal cost = null; @Required() public Date bookingStartDate = null; public Date bookingEndDate = null; public String notes = null; public String couponId = null; public String getName() { return name; } public CreateBooking setName(String value) { this.name = value; return this; } public String getPhoto() { return photo; } public CreateBooking setPhoto(String value) { this.photo = value; return this; } public RoomType getRoomType() { return roomType; } public CreateBooking setRoomType(RoomType value) { this.roomType = value; return this; } public Integer getRoomNumber() { return roomNumber; } public CreateBooking setRoomNumber(Integer value) { this.roomNumber = value; return this; } public BigDecimal getCost() { return cost; } public CreateBooking setCost(BigDecimal value) { this.cost = value; return this; } public Date getBookingStartDate() { return bookingStartDate; } public CreateBooking setBookingStartDate(Date value) { this.bookingStartDate = value; return this; } public Date getBookingEndDate() { return bookingEndDate; } public CreateBooking setBookingEndDate(Date value) { this.bookingEndDate = value; return this; } public String getNotes() { return notes; } public CreateBooking setNotes(String value) { this.notes = value; return this; } public String getCouponId() { return couponId; } public CreateBooking setCouponId(String value) { this.couponId = value; return this; } private static Object responseType = IdResponse.class; public Object getResponseType() { return responseType; } } @DataContract public static class IdResponse { @DataMember(Order=1) public String id = null; @DataMember(Order=2) public ResponseStatus responseStatus = null; public String getId() { return id; } public IdResponse setId(String value) { this.id = value; return this; } public ResponseStatus getResponseStatus() { return responseStatus; } public IdResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; } } /** * Booking Details */ public static class Booking extends AuditBase { public Integer id = null; public String name = null; public RoomType roomType = null; public Integer roomNumber = null; public Date bookingStartDate = null; public Date bookingEndDate = null; public BigDecimal cost = null; @References(Type=Coupon.class) public String couponId = null; public Coupon discount = null; public String notes = null; public Boolean cancelled = null; public Integer getId() { return id; } public Booking setId(Integer value) { this.id = value; return this; } public String getName() { return name; } public Booking setName(String value) { this.name = value; return this; } public RoomType getRoomType() { return roomType; } public Booking setRoomType(RoomType value) { this.roomType = value; return this; } public Integer getRoomNumber() { return roomNumber; } public Booking setRoomNumber(Integer value) { this.roomNumber = value; return this; } public Date getBookingStartDate() { return bookingStartDate; } public Booking setBookingStartDate(Date value) { this.bookingStartDate = value; return this; } public Date getBookingEndDate() { return bookingEndDate; } public Booking setBookingEndDate(Date value) { this.bookingEndDate = value; return this; } public BigDecimal getCost() { return cost; } public Booking setCost(BigDecimal value) { this.cost = value; return this; } public String getCouponId() { return couponId; } public Booking setCouponId(String value) { this.couponId = value; return this; } public Coupon getDiscount() { return discount; } public Booking setDiscount(Coupon value) { this.discount = value; return this; } public String getNotes() { return notes; } public Booking setNotes(String value) { this.notes = value; return this; } public Boolean isCancelled() { return cancelled; } public Booking setCancelled(Boolean value) { this.cancelled = value; return this; } } public static enum RoomType { Single, Double, Queen, Twin, Suite; } }