video_model.dart 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. class VideoModel {
  2. List<Records> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. VideoModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. VideoModel.fromJson(Map<String, dynamic> json) {
  16. if (json['records'] != null) {
  17. records = new List<Records>();
  18. json['records'].forEach((v) {
  19. records.add(new Records.fromJson(v));
  20. });
  21. }
  22. total = json['total'];
  23. size = json['size'];
  24. current = json['current'];
  25. searchCount = json['searchCount'];
  26. pages = json['pages'];
  27. }
  28. Map<String, dynamic> toJson() {
  29. final Map<String, dynamic> data = new Map<String, dynamic>();
  30. if (this.records != null) {
  31. data['records'] = this.records.map((v) => v.toJson()).toList();
  32. }
  33. data['total'] = this.total;
  34. data['size'] = this.size;
  35. data['current'] = this.current;
  36. data['searchCount'] = this.searchCount;
  37. data['pages'] = this.pages;
  38. return data;
  39. }
  40. }
  41. class Records {
  42. int id;
  43. int createTime;
  44. String createBy;
  45. int updateTime;
  46. String updateBy;
  47. String title;
  48. String descr;
  49. String cover;
  50. String url;
  51. int brandId;
  52. String userId;
  53. double reward;
  54. int favoriteNum;
  55. int likeNum;
  56. int browseNum;
  57. int hotFlag;
  58. int payNum;
  59. int statuz;
  60. int checkFlag;
  61. String checkComment;
  62. int platformFlag;
  63. String brandName;
  64. Records(
  65. {this.id,
  66. this.createTime,
  67. this.createBy,
  68. this.updateTime,
  69. this.updateBy,
  70. this.title,
  71. this.descr,
  72. this.cover,
  73. this.url,
  74. this.brandId,
  75. this.userId,
  76. this.reward,
  77. this.favoriteNum,
  78. this.likeNum,
  79. this.browseNum,
  80. this.hotFlag,
  81. this.payNum,
  82. this.statuz,
  83. this.checkFlag,
  84. this.checkComment,
  85. this.platformFlag,
  86. this.brandName});
  87. Records.fromJson(Map<String, dynamic> json) {
  88. id = json['id'];
  89. createTime = json['createTime'];
  90. createBy = json['createBy'];
  91. updateTime = json['updateTime'];
  92. updateBy = json['updateBy'];
  93. title = json['title'];
  94. descr = json['descr'];
  95. cover = json['cover'];
  96. url = json['url'];
  97. brandId = json['brandId'];
  98. userId = json['userId'];
  99. reward = json['reward'];
  100. favoriteNum = json['favoriteNum'];
  101. likeNum = json['likeNum'];
  102. browseNum = json['browseNum'];
  103. hotFlag = json['hotFlag'];
  104. payNum = json['payNum'];
  105. statuz = json['statuz'];
  106. checkFlag = json['checkFlag'];
  107. checkComment = json['checkComment'];
  108. platformFlag = json['platformFlag'];
  109. brandName = json['brandName'];
  110. }
  111. Map<String, dynamic> toJson() {
  112. final Map<String, dynamic> data = new Map<String, dynamic>();
  113. data['id'] = this.id;
  114. data['createTime'] = this.createTime;
  115. data['createBy'] = this.createBy;
  116. data['updateTime'] = this.updateTime;
  117. data['updateBy'] = this.updateBy;
  118. data['title'] = this.title;
  119. data['descr'] = this.descr;
  120. data['cover'] = this.cover;
  121. data['url'] = this.url;
  122. data['brandId'] = this.brandId;
  123. data['userId'] = this.userId;
  124. data['reward'] = this.reward;
  125. data['favoriteNum'] = this.favoriteNum;
  126. data['likeNum'] = this.likeNum;
  127. data['browseNum'] = this.browseNum;
  128. data['hotFlag'] = this.hotFlag;
  129. data['payNum'] = this.payNum;
  130. data['statuz'] = this.statuz;
  131. data['checkFlag'] = this.checkFlag;
  132. data['checkComment'] = this.checkComment;
  133. data['platformFlag'] = this.platformFlag;
  134. data['brandName'] = this.brandName;
  135. return data;
  136. }
  137. }