/* Options: Date: 2025-12-06 07:51:07 SwiftVersion: 6.0 Version: 8.80 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://business-api.brovs.com //BaseClass: //AddModelExtensions: True //AddServiceStackTypes: True //MakePropertiesOptional: True IncludeTypes: PlaceGetSelectedBrandsRequest.* //ExcludeTypes: //ExcludeGenericBaseTypes: False //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //InitializeCollections: True //TreatTypesAsStrings: //DefaultImports: Foundation,ServiceStack */ import Foundation import ServiceStack // @Route("/place/get_selected_brands", "GET") public class PlaceGetSelectedBrandsRequest : IReturn, IGet, IHasPlaceId, Codable { public typealias Return = PlaceGetSelectedBrandsResponse public var placeId:Int? required public init(){} } public class PlaceGetSelectedBrandsResponse : Codable { public var brandsWithCategories:[BrandWithCategoriesDto] = [] public var customBrandsWithCategories:[PlaceCustomBrandWithCategoriesDto] = [] required public init(){} } public protocol IHasPlaceId { var placeId:Int? { get set } } public class BrandDto : Codable { public var id:Int? public var definedByRootCategoryId:Int? public var name:String? required public init(){} } public class BrandWithCategoriesDto : BrandDto { public var categories:[CategoryDto] = [] required public init(){ super.init() } private enum CodingKeys : String, CodingKey { case categories } required public init(from decoder: Decoder) throws { try super.init(from: decoder) let container = try decoder.container(keyedBy: CodingKeys.self) categories = try container.decodeIfPresent([CategoryDto].self, forKey: .categories) ?? [] } public override func encode(to encoder: Encoder) throws { try super.encode(to: encoder) var container = encoder.container(keyedBy: CodingKeys.self) if categories.count > 0 { try container.encode(categories, forKey: .categories) } } } public class PlaceCustomBrandWithCategoriesDto : Codable { public var id:Int? public var definedByPlaceId:Int? public var label:String? public var categories:[CategoryDto] = [] required public init(){} } public class CategoryDto : Codable { public var id:Int? public var slug:String? public var absoluteSlug:String? public var name:String? public var parentId:Int? required public init(){} }