/* Options: Date: 2026-01-22 01:50:43 SwiftVersion: 5.0 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://pecuario-backend.develsystems.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: GetUserTypes.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/api/v1/utils/user-types", "GET") public class GetUserTypes : IReturn, IGet, Codable { public typealias Return = GetUserTypesResponse required public init(){} } public class GetUserTypesResponse : BaseResponse { public var userTypes:[UserType] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case userTypes } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) userTypes = try container.decodeIfPresent([UserType].self, forKey: .userTypes) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if userTypes.count > 0 { try container.encode(userTypes, forKey: .userTypes) } } } public class Status : Codable { public var message:String public var statusCode:Int required public init(){} } public class BaseResponse : Codable { public var status:Status required public init(){} } public class UserType : Codable { public var id:Int // @Required() // @StringLength(10) public var code:String? // @Required() // @StringLength(100) public var name:String? required public init(){} }