/* Options: Date: 2025-12-06 13:05:44 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: UpdateCategoryRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/category/update", "POST") public class UpdateCategoryRequest : CreateCategoryModel, IReturn { public typealias Return = CreateCategoryResponse public var id:Int public var isDeleted:Bool? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case isDeleted } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) id = try container.decodeIfPresent(Int.self, forKey: .id) isDeleted = try container.decodeIfPresent(Bool.self, forKey: .isDeleted) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if id != nil { try container.encode(id, forKey: .id) } if isDeleted != nil { try container.encode(isDeleted, forKey: .isDeleted) } } } public class CreateCategoryResponse : IResponseRequest, Codable { public var id:Int public var code:Int public var message:String required public init(){} } public enum CategoryTypes : String, Codable { case Department case PartyGroup case DocGroup case DocType case IssuingAgency case Status case Subjects case Workflow } public class CreateCategoryModel : Codable { public var name:String public var Description:String public var type:CategoryTypes public var isParty:Bool // @Ignore() public var childList:[Int] = [] required public init(){} } public protocol IResponseRequest { var code:Int { get set } var message:String { get set } }