/* Options: Date: 2026-06-24 18:56:47 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: SearchDocumentNumberFormatRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/document-number-format/search", "GET") public class SearchDocumentNumberFormatRequest : PagingRequest, IReturn { public typealias Return = PageResponse public var name:String public var typeKey:String required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case name case typeKey } 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) typeKey = try container.decodeIfPresent(String.self, forKey: .typeKey) } 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 typeKey != nil { try container.encode(typeKey, forKey: .typeKey) } } } public class PageResponse : IResponseRequest, Codable { public var code:Int public var message:String public var data:[DocumentNumberFormat] = [] public var pagination:Pagination required public init(){} } public class PagingRequest : Codable { public var page:Int public var limit:Int required public init(){} } public class DocumentNumberFormat : Codable { public var id:Int // @Required() // @StringLength(50) public var typeKey:String? // @Required() // @StringLength(255) public var name:String? // @Required() // @StringLength(255) public var formatTemplate:String? public var padding:Int public var resetPeriod:Int // @StringLength(500) public var labelKeys:String public var isActive:Bool public var isDeleted:Bool? public var deletedAt:Date? public var deletedBy:Int? public var createdAt:Date? public var createdBy:Int? public var updatedAt:Date? public var updatedBy:Int? required public init(){} }