(* Options:
Date: 2025-05-08 00:41:30
Version: 8.51
Tip: To override a DTO option, remove "//" prefix before updating
BaseUrl: https://blazor-gallery.servicestack.net

//GlobalNamespace: 
//MakeDataContractsExtensible: False
//AddReturnMarker: True
//AddDescriptionAsComments: True
//AddDataContractAttributes: False
//AddIndexesToDataMembers: False
//AddGeneratedCodeAttributes: False
//AddResponseStatus: False
//AddImplicitVersion: 
//ExportValueTypes: False
IncludeTypes: UpdateBooking.*
//ExcludeTypes: 
//InitializeCollections: False
//AddNamespaces: 
*)

namespace MyApp.ServiceModel

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    type RoomType =
        | Single = 0
        | Double = 1
        | Queen = 2
        | Twin = 3
        | Suite = 4

    ///<summary>
    ///Booking Details
    ///</summary>
    [<AllowNullLiteral>]
    type Booking() = 
        inherit AuditBase()
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val RoomType:RoomType = new RoomType() with get,set
        member val RoomNumber:Int32 = new Int32() with get,set
        member val BookingStartDate:DateTime = new DateTime() with get,set
        member val BookingEndDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Cost:Decimal = new Decimal() with get,set
        [<References(typeof<Coupon>)>]
        member val CouponId:String = null with get,set

        member val Discount:Coupon = null with get,set
        member val Notes:String = null with get,set
        member val Cancelled:Nullable<Boolean> = new Nullable<Boolean>() with get,set

    ///<summary>
    ///Update an existing Booking
    ///</summary>
    [<Route("/booking/{Id}", "PATCH")>]
    [<ValidateRequest(Validator="HasRole(`Employee`)")>]
    [<AllowNullLiteral>]
    type UpdateBooking() = 
        interface IReturn<IdResponse>
        member val Id:Int32 = new Int32() with get,set
        member val Name:String = null with get,set
        member val RoomType:Nullable<RoomType> = new Nullable<RoomType>() with get,set
        [<Validate(Validator="GreaterThan(0)")>]
        member val RoomNumber:Nullable<Int32> = new Nullable<Int32>() with get,set

        [<Validate(Validator="GreaterThan(0)")>]
        member val Cost:Nullable<Decimal> = new Nullable<Decimal>() with get,set

        member val BookingStartDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val BookingEndDate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Notes:String = null with get,set
        member val CouponId:String = null with get,set
        member val Cancelled:Nullable<Boolean> = new Nullable<Boolean>() with get,set