/* Options: Date: 2024-12-22 13:51:52 SwiftVersion: 6.0 Version: 8.51 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://techstacks.io //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: FindTechStacks.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: False //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/techstacks/search") // @AutoQueryViewer(DefaultSearchField="Description", DefaultSearchText="ServiceStack", DefaultSearchType="Contains", Description="Explore different Technology Stacks", IconUrl="material-icons:cloud", Title="Find Technology Stacks") public class FindTechStacks : QueryDb2, IReturn { public typealias Return = QueryResponse public var ids:[Int]? public var name:String? public var vendorName:String? public var nameContains:String? public var vendorNameContains:String? public var descriptionContains:String? required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case ids case name case vendorName case nameContains case vendorNameContains case descriptionContains } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) ids = try container.decodeIfPresent([Int].self, forKey: .ids) ?? [] name = try container.decodeIfPresent(String.self, forKey: .name) vendorName = try container.decodeIfPresent(String.self, forKey: .vendorName) nameContains = try container.decodeIfPresent(String.self, forKey: .nameContains) vendorNameContains = try container.decodeIfPresent(String.self, forKey: .vendorNameContains) descriptionContains = try container.decodeIfPresent(String.self, forKey: .descriptionContains) } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if ids != nil { try container.encode(ids, forKey: .ids) } if name != nil { try container.encode(name, forKey: .name) } if vendorName != nil { try container.encode(vendorName, forKey: .vendorName) } if nameContains != nil { try container.encode(nameContains, forKey: .nameContains) } if vendorNameContains != nil { try container.encode(vendorNameContains, forKey: .vendorNameContains) } if descriptionContains != nil { try container.encode(descriptionContains, forKey: .descriptionContains) } } } public class TechnologyStack : TechnologyStackBase { 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 TechnologyStackView : Codable { public var id:Int? public var name:String? public var vendorName:String? public var Description:String? public var appUrl:String? public var screenshotUrl:String? public var created:Date? public var createdBy:String? public var lastModified:Date? public var lastModifiedBy:String? public var isLocked:Bool? public var ownerId:String? public var slug:String? public var details:String? public var detailsHtml:String? public var lastStatusUpdate:Date? public var organizationId:Int? public var commentsPostId:Int? public var viewCount:Int? public var favCount:Int? required public init(){} } public class TechnologyStackBase : Codable { public var id:Int? public var name:String? public var vendorName:String? public var Description:String? public var appUrl:String? public var screenshotUrl:String? public var created:Date? public var createdBy:String? public var lastModified:Date? public var lastModifiedBy:String? public var isLocked:Bool? public var ownerId:String? public var slug:String? // @StringLength(Int32.max) public var details:String? // @StringLength(Int32.max) public var detailsHtml:String? public var lastStatusUpdate:Date? public var organizationId:Int? public var commentsPostId:Int? public var viewCount:Int? public var favCount:Int? required public init(){} }