comment_model.dart 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. class CommentModel {
  2. List<CommentDetailModel> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. CommentModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. CommentModel.fromJson(Map<String, dynamic> json) {
  16. if (json['records'] != null) {
  17. records = new List<CommentDetailModel>();
  18. json['records'].forEach((v) {
  19. records.add(new CommentDetailModel.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 CommentDetailModel {
  42. int attitude;
  43. String comment;
  44. String createBy;
  45. int createTime;
  46. int expertId;
  47. String expertName;
  48. String expression;
  49. int id;
  50. int lifeCaseId;
  51. String mobile;
  52. int responseSpeed;
  53. int statuz;
  54. int tech;
  55. String updateBy;
  56. int updateTime;
  57. int userId;
  58. String userName;
  59. String userUrl;
  60. CommentDetailModel(
  61. {this.attitude,
  62. this.comment,
  63. this.createBy,
  64. this.createTime,
  65. this.expertId,
  66. this.expertName,
  67. this.expression,
  68. this.id,
  69. this.lifeCaseId,
  70. this.mobile,
  71. this.responseSpeed,
  72. this.statuz,
  73. this.tech,
  74. this.updateBy,
  75. this.updateTime,
  76. this.userId,
  77. this.userName,
  78. this.userUrl});
  79. CommentDetailModel.fromJson(Map<String, dynamic> json) {
  80. attitude = json['attitude'];
  81. comment = json['comment'];
  82. createBy = json['createBy'];
  83. createTime = json['createTime'];
  84. expertId = json['expertId'];
  85. expertName = json['expertName'];
  86. expression = json['expression'];
  87. id = json['id'];
  88. lifeCaseId = json['lifeCaseId'];
  89. mobile = json['mobile'];
  90. responseSpeed = json['responseSpeed'];
  91. statuz = json['statuz'];
  92. tech = json['tech'];
  93. updateBy = json['updateBy'];
  94. updateTime = json['updateTime'];
  95. userId = json['userId'];
  96. userName = json['userName'];
  97. userUrl = json['userUrl'];
  98. }
  99. Map<String, dynamic> toJson() {
  100. final Map<String, dynamic> data = new Map<String, dynamic>();
  101. data['attitude'] = this.attitude;
  102. data['comment'] = this.comment;
  103. data['createBy'] = this.createBy;
  104. data['createTime'] = this.createTime;
  105. data['expertId'] = this.expertId;
  106. data['expertName'] = this.expertName;
  107. data['expression'] = this.expression;
  108. data['id'] = this.id;
  109. data['lifeCaseId'] = this.lifeCaseId;
  110. data['mobile'] = this.mobile;
  111. data['responseSpeed'] = this.responseSpeed;
  112. data['statuz'] = this.statuz;
  113. data['tech'] = this.tech;
  114. data['updateBy'] = this.updateBy;
  115. data['updateTime'] = this.updateTime;
  116. data['userId'] = this.userId;
  117. data['userName'] = this.userName;
  118. data['userUrl'] = this.userUrl;
  119. return data;
  120. }
  121. }