# frozen_string_literal: true # encoding: utf-8 # Options: =begin Date: 2026-08-15 01:46:28 Version: 10.09 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net #MakePartial: True #MakeVirtual: True #MakeInternal: False #MakeDataContractsExtensible: False #AddReturnMarker: True #AddDescriptionAsComments: True #AddDataContractAttributes: False #AddIndexesToDataMembers: False #AddGeneratedCodeAttributes: False #AddResponseStatus: False #AddImplicitVersion: #InitializeCollections: False #ExportValueTypes: False IncludeTypes: UpdateBooking.* #ExcludeTypes: #AddNamespaces: #AddDefaultXmlNamespace: http://schemas.servicestack.net/types =end require 'json' require 'servicestack' module RoomType SINGLE = 'Single' DOUBLE = 'Double' QUEEN = 'Queen' TWIN = 'Twin' SUITE = 'Suite' end module IReturn def response_type() = T def get_type_name() = 'IReturn' end module IPatchDb end # # Booking Details # class Booking < ServiceStack::AuditBase # @return [Integer] attr_accessor :id # @return [String] attr_accessor :name # @return [RoomType] attr_accessor :room_type # @return [Integer] attr_accessor :room_number # @return [DateTime] attr_accessor :booking_start_date # @return [DateTime] attr_accessor :booking_end_date # @return [BigDecimal] attr_accessor :cost # @References('Coupon') # @return [String] attr_accessor :coupon_id # @return [Coupon] attr_accessor :discount # @return [String] attr_accessor :notes # @return [TrueClass] attr_accessor :cancelled def self.properties { id: { name: 'id' }, name: { name: 'name' }, room_type: { name: 'roomType' }, room_number: { name: 'roomNumber' }, booking_start_date: { name: 'bookingStartDate', type: DateTime }, booking_end_date: { name: 'bookingEndDate', type: DateTime }, cost: { name: 'cost' }, coupon_id: { name: 'couponId' }, discount: { name: 'discount' }, notes: { name: 'notes' }, cancelled: { name: 'cancelled' }, } end end # # Update an existing Booking # # @Route("/booking/{Id}", "PATCH") # @ValidateRequest(Validator: "HasRole(`Employee`)") class UpdateBooking include ServiceStack::DTO # @return [Integer] attr_accessor :id # @return [String] attr_accessor :name # @return [RoomType] attr_accessor :room_type # @Validate(Validator: "GreaterThan(0)") # @return [Integer] attr_accessor :room_number # @Validate(Validator: "GreaterThan(0)") # @return [BigDecimal] attr_accessor :cost # @return [DateTime] attr_accessor :booking_start_date # @return [DateTime] attr_accessor :booking_end_date # @return [String] attr_accessor :notes # @return [String] attr_accessor :coupon_id # @return [TrueClass] attr_accessor :cancelled def self.properties { id: { name: 'id' }, name: { name: 'name' }, room_type: { name: 'roomType' }, room_number: { name: 'roomNumber' }, cost: { name: 'cost' }, booking_start_date: { name: 'bookingStartDate', type: DateTime }, booking_end_date: { name: 'bookingEndDate', type: DateTime }, notes: { name: 'notes' }, coupon_id: { name: 'couponId' }, cancelled: { name: 'cancelled' }, } end def response_type() = ServiceStack::IdResponse def get_type_name() = 'UpdateBooking' def get_method() = 'PATCH' end