/* Options: Date: 2024-11-23 10:13:22 SwiftVersion: 5.0 Version: 6.111 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://northwind.netcore.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: CachedGetOrders.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/cached/orders") // @Route("/cached/orders/page/{Page}") // @Route("/cached/customers/{CustomerId}/orders") public class CachedGetOrders : IReturn, IGet, Codable { public typealias Return = OrdersResponse public var page:Int? public var customerId:String required public init(){} } // @DataContract public class OrdersResponse : Codable { // @DataMember public var results:[CustomerOrder] = [] // @DataMember public var responseStatus:ResponseStatus required public init(){} } // @DataContract public class Order : Codable { // @DataMember public var id:Int // @DataMember public var customerId:String // @DataMember public var employeeId:Int // @DataMember public var orderDate:Date? // @DataMember public var requiredDate:Date? // @DataMember public var shippedDate:Date? // @DataMember public var shipVia:Int? // @DataMember public var freight:Double // @DataMember public var shipName:String // @DataMember public var shipAddress:String // @DataMember public var shipCity:String // @DataMember public var shipRegion:String // @DataMember public var shipPostalCode:String // @DataMember public var shipCountry:String required public init(){} } // @DataContract public class CustomerOrder : Codable { // @DataMember public var order:Order // @DataMember public var orderDetails:[OrderDetail] = [] required public init(){} } // @DataContract public class OrderDetail : Codable { // @DataMember public var orderId:Int // @DataMember public var productId:Int // @DataMember public var unitPrice:Double // @DataMember public var quantity:Int16 // @DataMember public var discount:Double required public init(){} }