/* Options: Date: 2024-12-22 21:55:48 SwiftVersion: 6.0 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazor-gallery.servicestack.net //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: QueryInvoices.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/invoices", "GET") // @Route("/invoices/{InvoiceId}", "GET") public class QueryInvoices : QueryDb, IReturn, IGet { public typealias Return = QueryResponse public var invoiceId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case invoiceId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) invoiceId = try container.decodeIfPresent(Int.self, forKey: .invoiceId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if invoiceId != nil { try container.encode(invoiceId, forKey: .invoiceId) } } } public class Invoices : Codable { public var invoiceId:Int? public var customerId:Int? public var invoiceDate:Date? public var billingAddress:String? public var billingCity:String? public var billingState:String? public var billingCountry:String? public var billingPostalCode:String? public var total:Double? required public init(){} }