ProductDetailModel.swift 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. //
  2. // ProductDetailModel.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class ProductDetailModel : NSObject, Mappable{
  7. class func newInstance(map: Map) -> Mappable?{
  8. return ProductDetailModel()
  9. }
  10. required init?(map: Map){}
  11. private override init(){}
  12. var attributeCategoryId : Int?
  13. var bigImg : String?
  14. var categoryId1 : Int?
  15. var categoryId2 : Int?
  16. var categoryId3 : Int?
  17. var city : [Int]?
  18. var deliverType : Int?
  19. var desc : String?
  20. var id : Int?
  21. var img : String?
  22. var imgs : [String]?
  23. var logoImg : String?
  24. var isConfirmSale : Int?
  25. var limitNumber : Int?
  26. var limitType : String?
  27. var name : String?
  28. var otherCode : String?
  29. var receiveTime : String?
  30. var receiveType : Int?
  31. var report : [String]?
  32. var saleName : String?
  33. var shopId : Int?
  34. var shopName : String?
  35. var spuCode : String?
  36. var storeTypeIds : String?
  37. var subtitle : String?
  38. var totalCount : Int?
  39. var totalStock : Int?
  40. var video : String?
  41. var commentNumber : Int?
  42. var skuPrice : String?
  43. var upStatus : Int?
  44. var label : [ProductDetailLabelModel]?
  45. var parameter : [ProductDetailParameterModel]?
  46. var sku : [ProductDetailSkuModel]?
  47. var spec : [ProductDetailSpecModel]?
  48. var skuStr : [ProductDetailSkuModel ]?
  49. func mapping(map: Map)
  50. {
  51. attributeCategoryId <- map["attribute_category_id"]
  52. bigImg <- map["big_img"]
  53. categoryId1 <- map["category_id1"]
  54. categoryId2 <- map["category_id2"]
  55. categoryId3 <- map["category_id3"]
  56. city <- map["city"]
  57. deliverType <- map["deliver_type"]
  58. desc <- map["desc"]
  59. id <- map["id"]
  60. img <- map["img"]
  61. imgs <- map["imgs"]
  62. logoImg <- map["logo_img"]
  63. isConfirmSale <- map["is_confirm_sale"]
  64. label <- map["label"]
  65. limitNumber <- map["limit_number"]
  66. limitType <- map["limit_type"]
  67. name <- map["name"]
  68. otherCode <- map["other_code"]
  69. parameter <- map["parameter"]
  70. receiveTime <- map["receive_time"]
  71. receiveType <- map["receive_type"]
  72. report <- map["report"]
  73. saleName <- map["sale_name"]
  74. shopId <- map["shop_id"]
  75. shopName <- map["shop_name"]
  76. sku <- map["sku"]
  77. spec <- map["spec"]
  78. spuCode <- map["spu_code"]
  79. storeTypeIds <- map["store_type_ids"]
  80. subtitle <- map["subtitle"]
  81. totalCount <- map["total_count"]
  82. totalStock <- map["total_stock"]
  83. video <- map["video"]
  84. commentNumber <- map["comment_number"]
  85. skuPrice <- map["sku_price"]
  86. upStatus <- map["up_status"]
  87. }
  88. }
  89. /// 检测标签
  90. class ProductDetailLabelModel : NSObject, Mappable{
  91. var img : String?
  92. var isMain : Int?
  93. var labelId : Int?
  94. var name : String?
  95. class func newInstance(map: Map) -> Mappable?{
  96. return ProductDetailLabelModel()
  97. }
  98. required init?(map: Map){}
  99. private override init(){}
  100. func mapping(map: Map)
  101. {
  102. img <- map["img"]
  103. isMain <- map["is_main"]
  104. labelId <- map["label_id"]
  105. name <- map["name"]
  106. }
  107. }
  108. /// 参数模型
  109. class ProductDetailParameterModel : NSObject, Mappable{
  110. var id : Int?
  111. var name : String?
  112. var value : String?
  113. class func newInstance(map: Map) -> Mappable?{
  114. return ProductDetailParameterModel()
  115. }
  116. required init?(map: Map){}
  117. private override init(){}
  118. func mapping(map: Map)
  119. {
  120. id <- map["id"]
  121. name <- map["name"]
  122. value <- map["value"]
  123. }
  124. }
  125. /// 规格
  126. class ProductDetailSkuModel : NSObject, Mappable{
  127. var costPrice : Int?
  128. var id : Int?
  129. var isMain : Int?
  130. var key : String?
  131. var originPrice : Int?
  132. var price : Int?
  133. var skuName : String?
  134. var stock : Int?
  135. var productCount : Int?
  136. class func newInstance(map: Map) -> Mappable?{
  137. return ProductDetailSkuModel()
  138. }
  139. required init?(map: Map){}
  140. private override init(){}
  141. func mapping(map: Map)
  142. {
  143. costPrice <- map["cost_price"]
  144. id <- map["id"]
  145. isMain <- map["is_main"]
  146. key <- map["key"]
  147. originPrice <- map["origin_price"]
  148. price <- map["price"]
  149. skuName <- map["sku_name"]
  150. stock <- map["stock"]
  151. }
  152. }
  153. /// 规格的内容
  154. class ProductDetailSpecModel : NSObject, Mappable{
  155. var id : Int?
  156. var name : String?
  157. var value : [ProductDetailSpecValueModel]?
  158. class func newInstance(map: Map) -> Mappable?{
  159. return ProductDetailSpecModel()
  160. }
  161. required init?(map: Map){}
  162. private override init(){}
  163. func mapping(map: Map)
  164. {
  165. id <- map["id"]
  166. name <- map["name"]
  167. value <- map["value"]
  168. }
  169. }
  170. class ProductDetailSpecValueModel : NSObject, Mappable{
  171. var id : Int?
  172. var value : String?
  173. class func newInstance(map: Map) -> Mappable?{
  174. return ProductDetailSpecValueModel()
  175. }
  176. required init?(map: Map){}
  177. private override init(){}
  178. func mapping(map: Map)
  179. {
  180. id <- map["id"]
  181. value <- map["value"]
  182. }
  183. }