/* Options: Date: 2026-03-06 08:33:04 SwiftVersion: 5.0 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://etc-api.vsmlab.vn //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: SearchProviderRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/provider/search", "GET") public class SearchProviderRequest : PagingRequest, IReturn { public typealias Return = PageResponse public var name:String public var providerType:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case providerType } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) name = try container.decodeIfPresent(String.self, forKey: .name) providerType = try container.decodeIfPresent(Int.self, forKey: .providerType) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if name != nil { try container.encode(name, forKey: .name) } if providerType != nil { try container.encode(providerType, forKey: .providerType) } } } public class PageResponse : IResponseRequest, Codable { public var code:Int public var message:String public var data:[Provider] = [] public var pagination:Pagination required public init(){} } public class PagingRequest : Codable { public var page:Int public var limit:Int required public init(){} } public class Provider : Codable { public var id:Int public var name:String public var taxCode:String public var address:String public var email:String public var additionalInfo:String public var providerType:Int public var createdAt:Date? public var createdBy:Int? required public init(){} }