/* Options: Date: 2025-01-08 03:25:12 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: QuerySearchStats.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @ValidateRequest(Validator="HasRole(`Moderator`)") public class QuerySearchStats : QueryDb, IReturn { public typealias Return = QueryResponse 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 SearchStat : StatBase { public var id:Int? public var query:String? public var similar:String? public var user:String? public var modifier:String? public var artist:String? public var album:String? public var show:String? public var source:String? public var artifactId:Int? public var albumId:Int? public var modifierId:Int? public var artistId:Int? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case id case query case similar case user case modifier case artist case album case show case source case artifactId case albumId case modifierId case artistId } 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) query = try container.decodeIfPresent(String.self, forKey: .query) similar = try container.decodeIfPresent(String.self, forKey: .similar) user = try container.decodeIfPresent(String.self, forKey: .user) modifier = try container.decodeIfPresent(String.self, forKey: .modifier) artist = try container.decodeIfPresent(String.self, forKey: .artist) album = try container.decodeIfPresent(String.self, forKey: .album) show = try container.decodeIfPresent(String.self, forKey: .show) source = try container.decodeIfPresent(String.self, forKey: .source) artifactId = try container.decodeIfPresent(Int.self, forKey: .artifactId) albumId = try container.decodeIfPresent(Int.self, forKey: .albumId) modifierId = try container.decodeIfPresent(Int.self, forKey: .modifierId) artistId = try container.decodeIfPresent(Int.self, forKey: .artistId) } 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 query != nil { try container.encode(query, forKey: .query) } if similar != nil { try container.encode(similar, forKey: .similar) } if user != nil { try container.encode(user, forKey: .user) } if modifier != nil { try container.encode(modifier, forKey: .modifier) } if artist != nil { try container.encode(artist, forKey: .artist) } if album != nil { try container.encode(album, forKey: .album) } if show != nil { try container.encode(show, forKey: .show) } if source != nil { try container.encode(source, forKey: .source) } if artifactId != nil { try container.encode(artifactId, forKey: .artifactId) } if albumId != nil { try container.encode(albumId, forKey: .albumId) } if modifierId != nil { try container.encode(modifierId, forKey: .modifierId) } if artistId != nil { try container.encode(artistId, forKey: .artistId) } } } 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(){} }