// // SPPayTemplateItem.swift // MoviaBox // // Created by 佳尔 on 2025/4/28. // import UIKit import SmartCodable class SPPayTemplateItem: SPModel, SmartCodable { enum BuyType: String, SmartCaseDefaultable { case coins = "coins" case subVip = "sub_vip" } enum VipTypeKey: String, SmartCaseDefaultable { case week = "week" case month = "month" case quarter = "quarter" case year = "year" func getText() -> String { switch self { case .week: return "w_complex".localized case .month: return "m_complex".localized case .quarter: return "q_complex".localized case .year: return "Y_complex".localized } } } var id: String? var status: String? var price: String? var origin_price: String? var backhaul_price: String? var coins: Int? var send_coins: Int? ///coins sub_vip var buy_type: BuyType? var sort: String? var title: String? var brief: String? var sp_description: String? var vip_type: String? var vip_type_key: VipTypeKey? var ios_template_id: String? ///货币符号 var currency: String? ///平台 var platform: String? ///角标 var corner_marker: String? static func mappingForKey() -> [SmartKeyTransformer]? { return [ CodingKeys.sp_description <--- ["description"] ] } }