ProductDetailModel.swift 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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 isConfirmSale : Int?
  24. var limitNumber : Int?
  25. var limitType : String?
  26. var name : String?
  27. var otherCode : String?
  28. var receiveTime : String?
  29. var receiveType : Int?
  30. var report : [String]?
  31. var saleName : String?
  32. var shopId : Int?
  33. var shopName : String?
  34. var spuCode : String?
  35. var storeTypeIds : String?
  36. var subtitle : String?
  37. var totalCount : Int?
  38. var totalStock : Int?
  39. var video : String?
  40. var label : [ProductDetailLabelModel]?
  41. var parameter : [ProductDetailParameterModel]?
  42. var sku : [ProductDetailSkuModel]?
  43. var spec : [ProductDetailSpecNameModel]?
  44. func mapping(map: Map)
  45. {
  46. attributeCategoryId <- map["attribute_category_id"]
  47. bigImg <- map["big_img"]
  48. categoryId1 <- map["category_id1"]
  49. categoryId2 <- map["category_id2"]
  50. categoryId3 <- map["category_id3"]
  51. city <- map["city"]
  52. deliverType <- map["deliver_type"]
  53. desc <- map["desc"]
  54. id <- map["id"]
  55. img <- map["img"]
  56. imgs <- map["imgs"]
  57. isConfirmSale <- map["is_confirm_sale"]
  58. label <- map["label"]
  59. limitNumber <- map["limit_number"]
  60. limitType <- map["limit_type"]
  61. name <- map["name"]
  62. otherCode <- map["other_code"]
  63. parameter <- map["parameter"]
  64. receiveTime <- map["receive_time"]
  65. receiveType <- map["receive_type"]
  66. report <- map["report"]
  67. saleName <- map["sale_name"]
  68. shopId <- map["shop_id"]
  69. shopName <- map["shop_name"]
  70. sku <- map["sku"]
  71. spec <- map["spec"]
  72. spuCode <- map["spu_code"]
  73. storeTypeIds <- map["store_type_ids"]
  74. subtitle <- map["subtitle"]
  75. totalCount <- map["total_count"]
  76. totalStock <- map["total_stock"]
  77. video <- map["video"]
  78. }
  79. }
  80. class ProductDetailLabelModel : NSObject, Mappable{
  81. var isMain : Int?
  82. var labelId : Int?
  83. class func newInstance(map: Map) -> Mappable?{
  84. return ProductDetailLabelModel()
  85. }
  86. required init?(map: Map){}
  87. private override init(){}
  88. func mapping(map: Map)
  89. {
  90. isMain <- map["is_main"]
  91. labelId <- map["label_id"]
  92. }
  93. }
  94. class ProductDetailParameterModel : NSObject, Mappable{
  95. var id : Int?
  96. var name : String?
  97. var value : String?
  98. class func newInstance(map: Map) -> Mappable?{
  99. return ProductDetailParameterModel()
  100. }
  101. required init?(map: Map){}
  102. private override init(){}
  103. func mapping(map: Map)
  104. {
  105. id <- map["id"]
  106. name <- map["name"]
  107. value <- map["value"]
  108. }
  109. }
  110. class ProductDetailSkuModel : NSObject, Mappable{
  111. var costPrice : Int?
  112. var id : Int?
  113. var isMain : Int?
  114. var names : [ProductDetailSkuNameModel]?
  115. var originPrice : Int?
  116. var price : Int?
  117. var stock : Int?
  118. class func newInstance(map: Map) -> Mappable?{
  119. return ProductDetailSkuModel()
  120. }
  121. required init?(map: Map){}
  122. private override init(){}
  123. func mapping(map: Map)
  124. {
  125. costPrice <- map["cost_price"]
  126. id <- map["id"]
  127. isMain <- map["is_main"]
  128. names <- map["names"]
  129. originPrice <- map["origin_price"]
  130. price <- map["price"]
  131. stock <- map["stock"]
  132. }
  133. }
  134. class ProductDetailSkuNameModel : NSObject, Mappable{
  135. var attributeItemId : Int?
  136. var name : String?
  137. var value : String?
  138. class func newInstance(map: Map) -> Mappable?{
  139. return ProductDetailSkuNameModel()
  140. }
  141. required init?(map: Map){}
  142. private override init(){}
  143. func mapping(map: Map)
  144. {
  145. attributeItemId <- map["attribute_item_id"]
  146. name <- map["name"]
  147. value <- map["value"]
  148. }
  149. }
  150. class ProductDetailSpecNameModel : NSObject, Mappable{
  151. var attributeItemId : Int?
  152. var name : String?
  153. var value : [String]?
  154. class func newInstance(map: Map) -> Mappable?{
  155. return ProductDetailSpecNameModel()
  156. }
  157. required init?(map: Map){}
  158. private override init(){}
  159. func mapping(map: Map)
  160. {
  161. attributeItemId <- map["attribute_item_id"]
  162. name <- map["name"]
  163. value <- map["value"]
  164. }
  165. }