/* Options: Date: 2025-08-04 03:37:37 SwiftVersion: 5.0 Version: 6.110 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://szallitoiportal-be.veolia.hu //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True IncludeTypes: AddContract.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/user/{supplieruserid}/contract", "POST") public class AddContract : ModifyContractBase, IReturn, IPost { public typealias Return = ModifyEntityResponse 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 ModifyEntityResponse : ResponseBase { public var id:Int required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id } 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) } 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) } } } public protocol IConcurrencyStamp { var concurrencyStamp:String { get set } } public class ModifyContractBase : ModifyRequestBase { public var tenderUserId:Int? public var contractIdentifier:String public var supplierUserId:Int public var buyer:String public var subject:String public var confirmationDeadline:Date required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case tenderUserId case contractIdentifier case supplierUserId case buyer case subject case confirmationDeadline } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) tenderUserId = try container.decodeIfPresent(Int.self, forKey: .tenderUserId) contractIdentifier = try container.decodeIfPresent(String.self, forKey: .contractIdentifier) supplierUserId = try container.decodeIfPresent(Int.self, forKey: .supplierUserId) buyer = try container.decodeIfPresent(String.self, forKey: .buyer) subject = try container.decodeIfPresent(String.self, forKey: .subject) confirmationDeadline = try container.decodeIfPresent(Date.self, forKey: .confirmationDeadline) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if tenderUserId != nil { try container.encode(tenderUserId, forKey: .tenderUserId) } if contractIdentifier != nil { try container.encode(contractIdentifier, forKey: .contractIdentifier) } if supplierUserId != nil { try container.encode(supplierUserId, forKey: .supplierUserId) } if buyer != nil { try container.encode(buyer, forKey: .buyer) } if subject != nil { try container.encode(subject, forKey: .subject) } if confirmationDeadline != nil { try container.encode(confirmationDeadline, forKey: .confirmationDeadline) } } } public class ResponseBase : Codable { public var responseStatus:ResponseStatus required public init(){} } public class ModifyRequestBase : IConcurrencyStamp, Codable { public var concurrencyStamp:String required public init(){} }