/* Options: Date: 2025-11-08 08:14:26 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://s4w2.api.bettor.cc //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: GetMonthlyRtp.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/qry/rtp/monthly") public class GetMonthlyRtp : PaginatedQueryRequest, IReturn { public typealias Return = PaginatedResult required public init(){ super.init() } required public init(from decoder: Decoder) throws { try super.init(from: decoder) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) } } public class PaginatedResult : IPaginatedResult, Codable { public var data:[DailyRTP] = [] public var currentPage:Int? public var pageSize:Int? public var totalItems:Int? public var totalPages:Int? required public init(){} } public class PaginatedQueryRequest : QueryRequest { public var currentPage:Int? public var pageSize:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case currentPage case pageSize } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) currentPage = try container.decodeIfPresent(Int.self, forKey: .currentPage) pageSize = try container.decodeIfPresent(Int.self, forKey: .pageSize) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if currentPage != nil { try container.encode(currentPage, forKey: .currentPage) } if pageSize != nil { try container.encode(pageSize, forKey: .pageSize) } } } public protocol IPaginatedResult { var currentPage:Int? { get set } var pageSize:Int? { get set } var totalItems:Int? { get set } var totalPages:Int? { get set } } public class QueryRequest : Codable { public var qry:[String:String] = [:] required public init(){} }