friend_model.dart 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. class FriendModel {
  2. List<Records> records;
  3. int total;
  4. int size;
  5. int current;
  6. bool searchCount;
  7. int pages;
  8. FriendModel(
  9. {this.records,
  10. this.total,
  11. this.size,
  12. this.current,
  13. this.searchCount,
  14. this.pages});
  15. FriendModel.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 sessionid;
  48. int dataId;
  49. int dataTable;
  50. String userId;
  51. String pwd;
  52. String createUserId;
  53. int statuz;
  54. String userName;
  55. String name;
  56. String expression;
  57. String avatarUrl;
  58. String msg;
  59. String lastMsg;
  60. int time;
  61. int lastTime;
  62. int isRed;
  63. int caseType;
  64. int acceptStatus;
  65. Records(
  66. {this.id,
  67. this.createTime,
  68. this.createBy,
  69. this.updateTime,
  70. this.updateBy,
  71. this.sessionid,
  72. this.dataId,
  73. this.dataTable,
  74. this.userId,
  75. this.pwd,
  76. this.createUserId,
  77. this.statuz,
  78. this.userName,
  79. this.name,
  80. this.expression,
  81. this.msg,
  82. this.lastMsg,
  83. this.time,
  84. this.lastTime,
  85. this.isRed,
  86. this.caseType,
  87. this.acceptStatus,
  88. this.avatarUrl});
  89. Records.fromJson(Map<String, dynamic> json) {
  90. id = json['id'];
  91. createTime = json['createTime'];
  92. createBy = json['createBy'];
  93. updateTime = json['updateTime'];
  94. updateBy = json['updateBy'];
  95. sessionid = json['sessionid'];
  96. dataId = json['dataId'];
  97. dataTable = json['dataTable'];
  98. userId = json['userId'];
  99. pwd = json['pwd'];
  100. createUserId = json['createUserId'];
  101. statuz = json['statuz'];
  102. userName = json['userName'];
  103. name = json['name'];
  104. expression = json['expression'];
  105. avatarUrl = json['avatarUrl'];
  106. msg = json['msg'];
  107. lastMsg = json['lastMsg'];
  108. time = json['time'];
  109. lastTime = json['lastTime'];
  110. isRed = json['isRed'];
  111. caseType = json['caseType'];
  112. acceptStatus = json['acceptStatus'];
  113. }
  114. Map<String, dynamic> toJson() {
  115. final Map<String, dynamic> data = new Map<String, dynamic>();
  116. data['id'] = this.id;
  117. data['createTime'] = this.createTime;
  118. data['createBy'] = this.createBy;
  119. data['updateTime'] = this.updateTime;
  120. data['updateBy'] = this.updateBy;
  121. data['sessionid'] = this.sessionid;
  122. data['dataId'] = this.dataId;
  123. data['dataTable'] = this.dataTable;
  124. data['userId'] = this.userId;
  125. data['pwd'] = this.pwd;
  126. data['createUserId'] = this.createUserId;
  127. data['statuz'] = this.statuz;
  128. data['userName'] = this.userName;
  129. data['name'] = this.name;
  130. data['expression'] = this.expression;
  131. data['avatarUrl'] = this.avatarUrl;
  132. data['msg'] = this.msg;
  133. data['lastMsg'] = this.lastMsg;
  134. data['time'] = this.time;
  135. data['lastTime'] = this.lastTime;
  136. data['isRed'] = this.isRed;
  137. data['caseType'] = this.caseType;
  138. data['acceptStatus'] = this.acceptStatus;
  139. return data;
  140. }
  141. }