ProductModel.swift 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. //
  2. // ProductModel.swift
  3. // Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport
  4. import Foundation
  5. import ObjectMapper
  6. class ProductModel : NSObject, Mappable{
  7. var attributeCategoryId : Int?
  8. var bigImg : String?
  9. var categoryId1 : Int?
  10. var categoryId2 : Int?
  11. var categoryId3 : Int?
  12. var cityId : Int?
  13. var commentNumber : Int?
  14. var commentScore : Int?
  15. var commentStar : String?
  16. var createdAt : String?
  17. var deletedAt : String?
  18. var deliverType : Int?
  19. var desc : String?
  20. var id : Int?
  21. var img : String?
  22. var isConfirmSale : Int?
  23. var isMain : Int?
  24. var limitNumber : Int?
  25. var limitType : String?
  26. var name : String?
  27. var originPrice : Int?
  28. var otherCode : String?
  29. var price : Int?
  30. var receiveTime : String?
  31. var receiveType : Int?
  32. var saleName : String?
  33. var saleStatus : Int?
  34. var shopId : Int?
  35. var shopName : String?
  36. var skuCode : String?
  37. var skuId : Int?
  38. var skuName : String?
  39. var sort : Int?
  40. var spuCode : String?
  41. var status : Int?
  42. var stock : Int?
  43. var storeTypeIds : String?
  44. var subtitle : String?
  45. var totalCount : Int?
  46. var totalStock : Int?
  47. var upStatus : Int?
  48. var updatedAt : String?
  49. var video : String?
  50. var wasteStatus : Int?
  51. // 购物车
  52. var cityName : String?
  53. var amount : Int?
  54. var isSelect : Int?
  55. var productId : Int?
  56. var productImg : String?
  57. var productName : String?
  58. var productPrice : Int?
  59. var skuPrice : Int?
  60. var uid : Int?
  61. // 购物车Id
  62. var cartId : Int?
  63. class func newInstance(map: Map) -> Mappable?{
  64. return ProductModel()
  65. }
  66. required init?(map: Map){}
  67. override init(){}
  68. func mapping(map: Map)
  69. {
  70. attributeCategoryId <- map["attribute_category_id"]
  71. bigImg <- map["big_img"]
  72. categoryId1 <- map["category_id1"]
  73. categoryId2 <- map["category_id2"]
  74. categoryId3 <- map["category_id3"]
  75. cityId <- map["city_id"]
  76. commentNumber <- map["comment_number"]
  77. commentScore <- map["comment_score"]
  78. commentStar <- map["comment_star"]
  79. createdAt <- map["created_at"]
  80. deletedAt <- map["deleted_at"]
  81. deliverType <- map["deliver_type"]
  82. desc <- map["desc"]
  83. id <- map["id"]
  84. img <- map["img"]
  85. isConfirmSale <- map["is_confirm_sale"]
  86. isMain <- map["is_main"]
  87. limitNumber <- map["limit_number"]
  88. limitType <- map["limit_type"]
  89. name <- map["name"]
  90. originPrice <- map["origin_price"]
  91. otherCode <- map["other_code"]
  92. price <- map["price"]
  93. receiveTime <- map["receive_time"]
  94. receiveType <- map["receive_type"]
  95. saleName <- map["sale_name"]
  96. saleStatus <- map["sale_status"]
  97. shopId <- map["shop_id"]
  98. shopName <- map["shop_name"]
  99. skuCode <- map["sku_code"]
  100. skuId <- map["sku_id"]
  101. skuName <- map["sku_name"]
  102. sort <- map["sort"]
  103. spuCode <- map["spu_code"]
  104. status <- map["status"]
  105. stock <- map["stock"]
  106. storeTypeIds <- map["store_type_ids"]
  107. subtitle <- map["subtitle"]
  108. totalCount <- map["total_count"]
  109. totalStock <- map["total_stock"]
  110. upStatus <- map["up_status"]
  111. updatedAt <- map["updated_at"]
  112. video <- map["video"]
  113. wasteStatus <- map["waste_status"]
  114. // 购物车
  115. amount <- map["amount"]
  116. isSelect <- map["is_select"]
  117. productId <- map["product_id"]
  118. productImg <- map["product_img"]
  119. productName <- map["product_name"]
  120. productPrice <- map["product_price"]
  121. skuPrice <- map["sku_price"]
  122. uid <- map["uid"]
  123. }
  124. }