/* Options: Date: 2025-01-08 03:23:29 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: CreateArtifactComment.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @ValidateRequest(Validator="IsAuthenticated") public class CreateArtifactComment : IReturn, Codable { public typealias Return = ArtifactComment public var artifactId:Int? public var replyId:Int? // @Validate(Validator="Length(1,280)") public var content:String? required public init(){} } public class ArtifactComment : AuditBase { public var id:Int? public var artifactId:Int? public var replyId:Int? public var content:String? public var upVotes:Int? public var downVotes:Int? public var votes:Int? public var flagReason:String? public var notes:String? public var refId:String? public var appUserId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case artifactId case replyId case content case upVotes case downVotes case votes case flagReason case notes case refId case appUserId } 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) artifactId = try container.decodeIfPresent(Int.self, forKey: .artifactId) replyId = try container.decodeIfPresent(Int.self, forKey: .replyId) content = try container.decodeIfPresent(String.self, forKey: .content) upVotes = try container.decodeIfPresent(Int.self, forKey: .upVotes) downVotes = try container.decodeIfPresent(Int.self, forKey: .downVotes) votes = try container.decodeIfPresent(Int.self, forKey: .votes) flagReason = try container.decodeIfPresent(String.self, forKey: .flagReason) notes = try container.decodeIfPresent(String.self, forKey: .notes) refId = try container.decodeIfPresent(String.self, forKey: .refId) appUserId = try container.decodeIfPresent(Int.self, forKey: .appUserId) } 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 artifactId != nil { try container.encode(artifactId, forKey: .artifactId) } if replyId != nil { try container.encode(replyId, forKey: .replyId) } if content != nil { try container.encode(content, forKey: .content) } if upVotes != nil { try container.encode(upVotes, forKey: .upVotes) } if downVotes != nil { try container.encode(downVotes, forKey: .downVotes) } if votes != nil { try container.encode(votes, forKey: .votes) } if flagReason != nil { try container.encode(flagReason, forKey: .flagReason) } if notes != nil { try container.encode(notes, forKey: .notes) } if refId != nil { try container.encode(refId, forKey: .refId) } if appUserId != nil { try container.encode(appUserId, forKey: .appUserId) } } }