/* Options: Date: 2024-12-22 21:48:09 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: QueryInvoiceItems.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/invoiceitems", "GET") // @Route("/invoiceitems/{InvoiceLineId}", "GET") public class QueryInvoiceItems : QueryDb, IReturn, IGet { public typealias Return = QueryResponse public var invoiceLineId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case invoiceLineId } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) invoiceLineId = try container.decodeIfPresent(Int.self, forKey: .invoiceLineId) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if invoiceLineId != nil { try container.encode(invoiceLineId, forKey: .invoiceLineId) } } } public class InvoiceItems : Codable { public var invoiceLineId:Int? public var invoiceId:Int? public var trackId:Int? public var unitPrice:Double? public var quantity:Int? required public init(){} }