/* Options: Date: 2024-12-04 19:03:04 Version: 8.12 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://vue-vite-api.jamstacks.net //Package: //GlobalNamespace: dtos //AddPropertyAccessors: True //SettersReturnThis: True //AddServiceStackTypes: True //AddResponseStatus: False //AddDescriptionAsComments: True //AddImplicitVersion: IncludeTypes: CreateBooking.* //ExcludeTypes: //TreatTypesAsStrings: //DefaultImports: java.math.*,java.util.*,net.servicestack.client.* */ import java.math.*; import java.util.*; 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 RoomType roomType = null; @Validate(Validator="GreaterThan(0)") public Integer roomNumber = null; @Validate(Validator="GreaterThan(0)") public BigDecimal cost = null; public Date bookingStartDate = null; public Date bookingEndDate = null; public String notes = null; public String getName() { return name; } public CreateBooking setName(String value) { this.name = 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; } 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; public String notes = null; public Boolean cancelled = null; @DataMember(Order=1) public Date createdDate = null; @DataMember(Order=2) @Required() public String createdBy = null; @DataMember(Order=3) public Date modifiedDate = null; @DataMember(Order=4) @Required() public String modifiedBy = null; @DataMember(Order=5) public Date deletedDate = null; @DataMember(Order=6) public String deletedBy = 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 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 Date getCreatedDate() { return createdDate; } public Booking setCreatedDate(Date value) { this.createdDate = value; return this; } public String getCreatedBy() { return createdBy; } public Booking setCreatedBy(String value) { this.createdBy = value; return this; } public Date getModifiedDate() { return modifiedDate; } public Booking setModifiedDate(Date value) { this.modifiedDate = value; return this; } public String getModifiedBy() { return modifiedBy; } public Booking setModifiedBy(String value) { this.modifiedBy = value; return this; } public Date getDeletedDate() { return deletedDate; } public Booking setDeletedDate(Date value) { this.deletedDate = value; return this; } public String getDeletedBy() { return deletedBy; } public Booking setDeletedBy(String value) { this.deletedBy = value; return this; } } public static enum RoomType { Single, Double, Queen, Twin, Suite; } }