ProductDetailModel.swift 4.4 KB

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