friend_model.dart 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. int time;
  60. int caseType;
  61. int acceptStatus;
  62. Records(
  63. {this.id,
  64. this.createTime,
  65. this.createBy,
  66. this.updateTime,
  67. this.updateBy,
  68. this.sessionid,
  69. this.dataId,
  70. this.dataTable,
  71. this.userId,
  72. this.pwd,
  73. this.createUserId,
  74. this.statuz,
  75. this.userName,
  76. this.name,
  77. this.expression,
  78. this.msg,
  79. this.time,
  80. this.caseType,
  81. this.acceptStatus,
  82. this.avatarUrl});
  83. Records.fromJson(Map<String, dynamic> json) {
  84. id = json['id'];
  85. createTime = json['createTime'];
  86. createBy = json['createBy'];
  87. updateTime = json['updateTime'];
  88. updateBy = json['updateBy'];
  89. sessionid = json['sessionid'];
  90. dataId = json['dataId'];
  91. dataTable = json['dataTable'];
  92. userId = json['userId'];
  93. pwd = json['pwd'];
  94. createUserId = json['createUserId'];
  95. statuz = json['statuz'];
  96. userName = json['userName'];
  97. name = json['name'];
  98. expression = json['expression'];
  99. avatarUrl = json['avatarUrl'];
  100. msg = json['msg'];
  101. time = json['time'];
  102. caseType = json['caseType'];
  103. acceptStatus = json['acceptStatus'];
  104. }
  105. Map<String, dynamic> toJson() {
  106. final Map<String, dynamic> data = new Map<String, dynamic>();
  107. data['id'] = this.id;
  108. data['createTime'] = this.createTime;
  109. data['createBy'] = this.createBy;
  110. data['updateTime'] = this.updateTime;
  111. data['updateBy'] = this.updateBy;
  112. data['sessionid'] = this.sessionid;
  113. data['dataId'] = this.dataId;
  114. data['dataTable'] = this.dataTable;
  115. data['userId'] = this.userId;
  116. data['pwd'] = this.pwd;
  117. data['createUserId'] = this.createUserId;
  118. data['statuz'] = this.statuz;
  119. data['userName'] = this.userName;
  120. data['name'] = this.name;
  121. data['expression'] = this.expression;
  122. data['avatarUrl'] = this.avatarUrl;
  123. data['msg'] = this.msg;
  124. data['time'] = this.time;
  125. data['caseType'] = this.caseType;
  126. data['acceptStatus'] = this.acceptStatus;
  127. return data;
  128. }
  129. }