friend_model.dart 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  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; // 1:问诊2:出诊3:私聊
  50. String userId;
  51. String pwd;
  52. String createUserId;
  53. String targetUserId;
  54. int statuz;
  55. String userName;
  56. String name;
  57. String remarks;
  58. String expression;
  59. String avatarUrl;
  60. String msg;
  61. String lastMsg;
  62. int time;
  63. int lastTime;
  64. int isRed;
  65. int caseType;
  66. int acceptStatus;
  67. Records(
  68. {this.id,
  69. this.createTime,
  70. this.createBy,
  71. this.updateTime,
  72. this.updateBy,
  73. this.sessionid,
  74. this.dataId,
  75. this.dataTable,
  76. this.userId,
  77. this.pwd,
  78. this.createUserId,
  79. this.targetUserId,
  80. this.statuz,
  81. this.userName,
  82. this.name,
  83. this.remarks,
  84. this.expression,
  85. this.msg,
  86. this.lastMsg,
  87. this.time,
  88. this.lastTime,
  89. this.isRed,
  90. this.caseType,
  91. this.acceptStatus,
  92. this.avatarUrl});
  93. Records.fromJson(Map<String, dynamic> json) {
  94. id = json['id'];
  95. createTime = json['createTime'];
  96. createBy = json['createBy'];
  97. updateTime = json['updateTime'];
  98. updateBy = json['updateBy'];
  99. sessionid = json['sessionid'];
  100. dataId = json['dataId'];
  101. dataTable = json['dataTable'];
  102. userId = json['userId'];
  103. pwd = json['pwd'];
  104. createUserId = json['createUserId'];
  105. targetUserId = json['targetId'];
  106. statuz = json['statuz'];
  107. userName = json['userName'];
  108. name = json['name'];
  109. remarks = json['kindlyName'];
  110. expression = json['expression'];
  111. avatarUrl = json['avatarUrl'];
  112. msg = json['msg'];
  113. lastMsg = json['lastMsg'];
  114. time = json['time'];
  115. lastTime = json['lastTime'];
  116. isRed = json['isRed'];
  117. caseType = json['caseType'];
  118. acceptStatus = json['acceptStatus'];
  119. }
  120. Map<String, dynamic> toJson() {
  121. final Map<String, dynamic> data = new Map<String, dynamic>();
  122. data['id'] = this.id;
  123. data['createTime'] = this.createTime;
  124. data['createBy'] = this.createBy;
  125. data['updateTime'] = this.updateTime;
  126. data['updateBy'] = this.updateBy;
  127. data['sessionid'] = this.sessionid;
  128. data['dataId'] = this.dataId;
  129. data['dataTable'] = this.dataTable;
  130. data['userId'] = this.userId;
  131. data['pwd'] = this.pwd;
  132. data['createUserId'] = this.createUserId;
  133. data['statuz'] = this.statuz;
  134. data['userName'] = this.userName;
  135. data['name'] = this.name;
  136. data['expression'] = this.expression;
  137. data['avatarUrl'] = this.avatarUrl;
  138. data['msg'] = this.msg;
  139. data['lastMsg'] = this.lastMsg;
  140. data['time'] = this.time;
  141. data['lastTime'] = this.lastTime;
  142. data['isRed'] = this.isRed;
  143. data['caseType'] = this.caseType;
  144. data['acceptStatus'] = this.acceptStatus;
  145. return data;
  146. }
  147. }