shop_detail.dart 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. class ShopDetailModel {
  2. int id;
  3. int createTime;
  4. String createBy;
  5. int updateTime;
  6. String updateBy;
  7. String name;
  8. double price;
  9. double discountPrice;
  10. int brandId;
  11. String descr;
  12. String imgs;
  13. String manufacturer;
  14. String brandName;
  15. String telephone;
  16. int favoriteNum;
  17. int likeNum;
  18. int browseNum;
  19. int hotFlag;
  20. int statuz;
  21. int isFavorite;
  22. int favoriteId;
  23. String contactPerson;
  24. ShopDetailModel(
  25. {this.id,
  26. this.createTime,
  27. this.createBy,
  28. this.updateTime,
  29. this.updateBy,
  30. this.name,
  31. this.price,
  32. this.discountPrice,
  33. this.brandId,
  34. this.descr,
  35. this.imgs,
  36. this.manufacturer,
  37. this.brandName,
  38. this.telephone,
  39. this.favoriteNum,
  40. this.likeNum,
  41. this.browseNum,
  42. this.hotFlag,
  43. this.statuz,
  44. this.isFavorite,
  45. this.favoriteId,
  46. this.contactPerson});
  47. ShopDetailModel.fromJson(Map<String, dynamic> json) {
  48. id = json['id'];
  49. createTime = json['createTime'];
  50. createBy = json['createBy'];
  51. updateTime = json['updateTime'];
  52. updateBy = json['updateBy'];
  53. name = json['name'];
  54. price = json['price'];
  55. discountPrice = json['discountPrice'];
  56. brandId = json['brandId'];
  57. descr = json['descr'];
  58. imgs = json['imgs'];
  59. manufacturer = json['manufacturer'];
  60. telephone = json['telephone'];
  61. favoriteNum = json['favoriteNum'];
  62. likeNum = json['likeNum'];
  63. browseNum = json['browseNum'];
  64. hotFlag = json['hotFlag'];
  65. statuz = json['statuz'];
  66. isFavorite = json['isFavorite'];
  67. favoriteId = json['favoriteId'];
  68. brandName = json['brandName'];
  69. contactPerson = json['contactPerson'];
  70. }
  71. Map<String, dynamic> toJson() {
  72. final Map<String, dynamic> data = new Map<String, dynamic>();
  73. data['id'] = this.id;
  74. data['createTime'] = this.createTime;
  75. data['createBy'] = this.createBy;
  76. data['updateTime'] = this.updateTime;
  77. data['updateBy'] = this.updateBy;
  78. data['name'] = this.name;
  79. data['price'] = this.price;
  80. data['brandId'] = this.brandId;
  81. data['descr'] = this.descr;
  82. data['imgs'] = this.imgs;
  83. data['manufacturer'] = this.manufacturer;
  84. data['telephone'] = this.telephone;
  85. data['favoriteNum'] = this.favoriteNum;
  86. data['likeNum'] = this.likeNum;
  87. data['browseNum'] = this.browseNum;
  88. data['hotFlag'] = this.hotFlag;
  89. data['statuz'] = this.statuz;
  90. data['isFavorite'] = this.isFavorite;
  91. data['favoriteId'] = this.favoriteId;
  92. data['brandName'] = this.brandName;
  93. data['contactPerson'] = this.contactPerson;
  94. return data;
  95. }
  96. }