queue_user_model.dart 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /// code : "OK"
  2. /// data : {"list":[{"userId":"418082988228608","userName":"明愁吃愁穿c","userAvatar":"http://user.qn.timichat.net/avatar/418082988228608/1624968976625.png","wealthLevel":33,"userNo":"10129696","sitTime":"1631788033485","userSex":1}]}
  3. /// msg : ""
  4. /// success : true
  5. class QueueUserModel {
  6. String? _code;
  7. Data? _data;
  8. String? _msg;
  9. bool? _success;
  10. String? get code => _code;
  11. Data? get data => _data;
  12. String? get msg => _msg;
  13. bool? get success => _success;
  14. QueueUserModel({
  15. String? code,
  16. Data? data,
  17. String? msg,
  18. bool? success}){
  19. _code = code;
  20. _data = data;
  21. _msg = msg;
  22. _success = success;
  23. }
  24. QueueUserModel.fromJson(dynamic json) {
  25. _code = json['code'];
  26. _data = json['data'] != null ? Data.fromJson(json['data']) : null;
  27. _msg = json['msg'];
  28. _success = json['success'];
  29. }
  30. Map<String, dynamic> toJson() {
  31. var map = <String, dynamic>{};
  32. map['code'] = _code;
  33. if (_data != null) {
  34. map['data'] = _data?.toJson();
  35. }
  36. map['msg'] = _msg;
  37. map['success'] = _success;
  38. return map;
  39. }
  40. }
  41. /// list : [{"userId":"418082988228608","userName":"明愁吃愁穿c","userAvatar":"http://user.qn.timichat.net/avatar/418082988228608/1624968976625.png","wealthLevel":33,"userNo":"10129696","sitTime":"1631788033485","userSex":1}]
  42. class Data {
  43. List<QueueList>? _list;
  44. List<QueueList>? get list => _list;
  45. Data({
  46. List<QueueList>? list}){
  47. _list = list;
  48. }
  49. Data.fromJson(dynamic json) {
  50. if (json['list'] != null) {
  51. _list = [];
  52. json['list'].forEach((v) {
  53. _list?.add(QueueList.fromJson(v));
  54. });
  55. }
  56. }
  57. Map<String, dynamic> toJson() {
  58. var map = <String, dynamic>{};
  59. if (_list != null) {
  60. map['list'] = _list?.map((v) => v.toJson()).toList();
  61. }
  62. return map;
  63. }
  64. }
  65. /// userId : "418082988228608"
  66. /// userName : "明愁吃愁穿c"
  67. /// userAvatar : "http://user.qn.timichat.net/avatar/418082988228608/1624968976625.png"
  68. /// wealthLevel : 33
  69. /// userNo : "10129696"
  70. /// sitTime : "1631788033485"
  71. /// userSex : 1
  72. class QueueList {
  73. String? _userId;
  74. String? _userName;
  75. String? _userAvatar;
  76. int? _wealthLevel;
  77. String? _userNo;
  78. String? _sitTime;
  79. int? _userSex;
  80. String? get userId => _userId;
  81. String? get userName => _userName;
  82. String? get userAvatar => _userAvatar;
  83. int? get wealthLevel => _wealthLevel;
  84. String? get userNo => _userNo;
  85. String? get sitTime => _sitTime;
  86. int? get userSex => _userSex;
  87. QueueList({
  88. String? userId,
  89. String? userName,
  90. String? userAvatar,
  91. int? wealthLevel,
  92. String? userNo,
  93. String? sitTime,
  94. int? userSex}){
  95. _userId = userId;
  96. _userName = userName;
  97. _userAvatar = userAvatar;
  98. _wealthLevel = wealthLevel;
  99. _userNo = userNo;
  100. _sitTime = sitTime;
  101. _userSex = userSex;
  102. }
  103. QueueList.fromJson(dynamic json) {
  104. _userId = json['userId'];
  105. _userName = json['userName'];
  106. _userAvatar = json['userAvatar'];
  107. _wealthLevel = json['wealthLevel'];
  108. _userNo = json['userNo'];
  109. _sitTime = json['sitTime'];
  110. _userSex = json['userSex'];
  111. }
  112. Map<String, dynamic> toJson() {
  113. var map = <String, dynamic>{};
  114. map['userId'] = _userId;
  115. map['userName'] = _userName;
  116. map['userAvatar'] = _userAvatar;
  117. map['wealthLevel'] = _wealthLevel;
  118. map['userNo'] = _userNo;
  119. map['sitTime'] = _sitTime;
  120. map['userSex'] = _userSex;
  121. return map;
  122. }
  123. }