//
//  YHSelectCaViewModel.swift
//  galaxy
//
//  Created by EDY on 2024/11/28.
//  Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//

import UIKit
import SmartCodable

class YHSelectCategoryModel: SmartCodable {
    
    var id: String = ""
    var name: String = ""
    var pid: Int = 0
    var `operator`: String = ""
    var operatorName: String = ""
    var status: Int = 0
    var createdAt: String = ""
    var updatedAt: String = ""
    var sort: Int = 0

    required init() {
    }
}

class YHSelectGoodModel: SmartCodable {
    
    var total: Int = 0
    var list: [YHSelectGoodsModel] = []
    required init() {
    }
}

class YHSelectGoodsModel: SmartCodable {
    
    static let fix_new_productRatio = 160.0/335
    
    var id: String = ""
    var name: String = ""
    var products: [Int] = []
    var catAttr: Int = 0
    var price: String = ""
    var cost: String = ""
    var thirdCost: String = ""
    var concessions: String = ""
    var deposit: String = ""
    var `operator`: String = ""
    var status: Int = 0
    var createdAt: String = ""
    var updatedAt: String = ""
    var sn: String = ""
    var image: String = ""
    var banner: [Int] = []
    var viewConfig: String = ""
    var description: String = ""
    var serviceCost: String = ""
    var linePrice: String = ""
    var details: [Int] = []
    var stock: Int = 0
    var startTime: String = ""
    var endTime: String = ""
    var statusText: String = ""
    var catAttrText: String = ""
    var icons: [YHSelectGoodIconModel] = []
    // 货币符号 HKD、CNY
    var currency: String = ""
    var goodsCategoryType: Int = 0 // 产品的分类类型：0 默认普通，1 新品商品
    
    // 新品图片宽高比
    var ratio: CGFloat = YHSelectGoodsModel.fix_new_productRatio
    
    required init() {
        
    }
}

class YHSelectGoodIconModel: SmartCodable {
    
    var description: String = ""
    var color: String = ""
    required init() {
    }
}
