shop_detail.dart 2.5 KB

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