/* Options: Date: 2025-01-08 04:01:56 SwiftVersion: 6.0 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://blazordiffusion.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: UpdateSignup.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @ValidateRequest(Validator="HasRole(`Moderator`)") public class UpdateSignup : IReturn, Codable { public typealias Return = Signup public var id:Int? public var type:SignupType? // @Validate(Validator="Email") public var email:String? public var name:String? public var cancelledDate:Date? required public init(){} } public class Signup : StatBase { public var id:Int? public var type:SignupType? public var email:String? public var name:String? public var cancelledDate:Date? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case type case email case name case cancelledDate } 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) type = try container.decodeIfPresent(SignupType.self, forKey: .type) email = try container.decodeIfPresent(String.self, forKey: .email) name = try container.decodeIfPresent(String.self, forKey: .name) cancelledDate = try container.decodeIfPresent(Date.self, forKey: .cancelledDate) } 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 type != nil { try container.encode(type, forKey: .type) } if email != nil { try container.encode(email, forKey: .email) } if name != nil { try container.encode(name, forKey: .name) } if cancelledDate != nil { try container.encode(cancelledDate, forKey: .cancelledDate) } } } public enum SignupType : String, Codable { case Updates case Beta } public class StatBase : Codable { public var refId:String? public var appUserId:Int? public var rawUrl:String? public var remoteIp:String? public var createdDate:Date? required public init(){} }