/* Options:
Date: 2024-12-04 08:47:54
Version: 8.12
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://vue-vite-api.jamstacks.net
//GlobalNamespace:
//MakePartial: True
//MakeVirtual: True
//MakeInternal: False
//MakeDataContractsExtensible: False
//AddNullableAnnotations: False
//AddReturnMarker: True
//AddDescriptionAsComments: True
//AddDataContractAttributes: False
//AddIndexesToDataMembers: False
//AddGeneratedCodeAttributes: False
//AddResponseStatus: False
//AddImplicitVersion:
//InitializeCollections: True
//ExportValueTypes: False
IncludeTypes: CreateBooking.*
//ExcludeTypes:
//AddNamespaces:
//AddDefaultXmlNamespace: http://schemas.servicestack.net/types
*/
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using MyApp.ServiceModel;
namespace MyApp.ServiceModel
{
///
///Booking Details
///
public partial class Booking
: AuditBase
{
public virtual int Id { get; set; }
public virtual string Name { get; set; }
public virtual RoomType RoomType { get; set; }
public virtual int RoomNumber { get; set; }
public virtual DateTime BookingStartDate { get; set; }
public virtual DateTime? BookingEndDate { get; set; }
public virtual decimal Cost { get; set; }
public virtual string Notes { get; set; }
public virtual bool? Cancelled { get; set; }
[DataMember(Order=1)]
public virtual DateTime CreatedDate { get; set; }
[DataMember(Order=2)]
[Required]
public virtual string CreatedBy { get; set; }
[DataMember(Order=3)]
public virtual DateTime ModifiedDate { get; set; }
[DataMember(Order=4)]
[Required]
public virtual string ModifiedBy { get; set; }
[DataMember(Order=5)]
public virtual DateTime? DeletedDate { get; set; }
[DataMember(Order=6)]
public virtual string DeletedBy { get; set; }
}
///
///Create a new Booking
///
[Route("/bookings", "POST")]
[ValidateRequest("HasRole(`Employee`)")]
public partial class CreateBooking
: IReturn, ICreateDb
{
///
///Name this Booking is for
///
[Validate("NotEmpty")]
public virtual string Name { get; set; }
public virtual RoomType RoomType { get; set; }
[Validate("GreaterThan(0)")]
public virtual int RoomNumber { get; set; }
[Validate("GreaterThan(0)")]
public virtual decimal Cost { get; set; }
public virtual DateTime BookingStartDate { get; set; }
public virtual DateTime? BookingEndDate { get; set; }
public virtual string Notes { get; set; }
}
public enum RoomType
{
Single,
Double,
Queen,
Twin,
Suite,
}
}