home_dust_rank_model.dart 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. /// code : "OK"
  2. /// data : {"list":[{"userId":"518741896986624","userName":"宁雪松16","userAvatar":"http://user.qn.soybean.net/avatar/518741896986624/1636968505492.png","rankNo":1,"amount":"10","wealthLevel":12,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":1},{"userId":"518746015793152","userName":"发广告15","userAvatar":"http://user.qn.soybean.net/avatar/518746015793152/1636968970358.png","rankNo":2,"amount":"10","wealthLevel":1,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":2},{"userId":"514371599990784","userName":"高辛17","userAvatar":"http://user.qn.soybean.com/avatar/default_male.png","rankNo":3,"amount":"10","wealthLevel":2,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":1}],"myRankItem":{"userId":"418082988228608","userName":"明愁吃滴休息","userAvatar":"http://user.qn.soybean.net/avatar/418082988228608/1640602657073.png","rankNo":0,"amount":"0","wealthLevel":37,"roomId":null,"isOnline":null,"animationFile":null,"role":null,"userSex":null}}
  3. /// msg : ""
  4. /// success : true
  5. class HomeDustRankModel {
  6. HomeDustRankModel({
  7. String? code,
  8. Data? data,
  9. String? msg,
  10. bool? success,}){
  11. _code = code;
  12. _data = data;
  13. _msg = msg;
  14. _success = success;
  15. }
  16. HomeDustRankModel.fromJson(dynamic json) {
  17. _code = json['code'];
  18. _data = json['data'] != null ? Data.fromJson(json['data']) : null;
  19. _msg = json['msg'];
  20. _success = json['success'];
  21. }
  22. String? _code;
  23. Data? _data;
  24. String? _msg;
  25. bool? _success;
  26. String? get code => _code;
  27. Data? get data => _data;
  28. String? get msg => _msg;
  29. bool? get success => _success;
  30. Map<String, dynamic> toJson() {
  31. final 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":"518741896986624","userName":"宁雪松16","userAvatar":"http://user.qn.soybean.net/avatar/518741896986624/1636968505492.png","rankNo":1,"amount":"10","wealthLevel":12,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":1},{"userId":"518746015793152","userName":"发广告15","userAvatar":"http://user.qn.soybean.net/avatar/518746015793152/1636968970358.png","rankNo":2,"amount":"10","wealthLevel":1,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":2},{"userId":"514371599990784","userName":"高辛17","userAvatar":"http://user.qn.soybean.com/avatar/default_male.png","rankNo":3,"amount":"10","wealthLevel":2,"roomId":null,"isOnline":0,"animationFile":null,"role":null,"userSex":1}]
  42. /// myRankItem : {"userId":"418082988228608","userName":"明愁吃滴休息","userAvatar":"http://user.qn.soybean.net/avatar/418082988228608/1640602657073.png","rankNo":0,"amount":"0","wealthLevel":37,"roomId":null,"isOnline":null,"animationFile":null,"role":null,"userSex":null}
  43. class Data {
  44. Data({
  45. List<DustList>? list,
  46. MyRankItem? myRankItem,}){
  47. _list = list;
  48. _myRankItem = myRankItem;
  49. }
  50. Data.fromJson(dynamic json) {
  51. if (json['list'] != null) {
  52. _list = [];
  53. json['list'].forEach((v) {
  54. _list?.add(DustList.fromJson(v));
  55. });
  56. }
  57. _myRankItem = json['myRankItem'] != null ? MyRankItem.fromJson(json['myRankItem']) : null;
  58. }
  59. List<DustList>? _list;
  60. MyRankItem? _myRankItem;
  61. List<DustList>? get list => _list;
  62. MyRankItem? get myRankItem => _myRankItem;
  63. Map<String, dynamic> toJson() {
  64. final map = <String, dynamic>{};
  65. if (_list != null) {
  66. map['list'] = _list?.map((v) => v.toJson()).toList();
  67. }
  68. if (_myRankItem != null) {
  69. map['myRankItem'] = _myRankItem?.toJson();
  70. }
  71. return map;
  72. }
  73. }
  74. /// userId : "418082988228608"
  75. /// userName : "明愁吃滴休息"
  76. /// userAvatar : "http://user.qn.soybean.net/avatar/418082988228608/1640602657073.png"
  77. /// rankNo : 0
  78. /// amount : "0"
  79. /// wealthLevel : 37
  80. /// roomId : null
  81. /// isOnline : null
  82. /// animationFile : null
  83. /// role : null
  84. /// userSex : null
  85. class MyRankItem {
  86. MyRankItem({
  87. String? userId,
  88. String? userName,
  89. String? userAvatar,
  90. int? rankNo,
  91. String? amount,
  92. int? wealthLevel,
  93. dynamic roomId,
  94. dynamic isOnline,
  95. dynamic animationFile,
  96. dynamic role,
  97. dynamic userSex,}){
  98. _userId = userId;
  99. _userName = userName;
  100. _userAvatar = userAvatar;
  101. _rankNo = rankNo;
  102. _amount = amount;
  103. _wealthLevel = wealthLevel;
  104. _roomId = roomId;
  105. _isOnline = isOnline;
  106. _animationFile = animationFile;
  107. _role = role;
  108. _userSex = userSex;
  109. }
  110. MyRankItem.fromJson(dynamic json) {
  111. _userId = json['userId'];
  112. _userName = json['userName'];
  113. _userAvatar = json['userAvatar'];
  114. _rankNo = json['rankNo'];
  115. _amount = json['amount'];
  116. _wealthLevel = json['wealthLevel'];
  117. _roomId = json['roomId'];
  118. _isOnline = json['isOnline'];
  119. _animationFile = json['animationFile'];
  120. _role = json['role'];
  121. _userSex = json['userSex'];
  122. }
  123. String? _userId;
  124. String? _userName;
  125. String? _userAvatar;
  126. int? _rankNo;
  127. String? _amount;
  128. int? _wealthLevel;
  129. dynamic _roomId;
  130. dynamic _isOnline;
  131. dynamic _animationFile;
  132. dynamic _role;
  133. dynamic _userSex;
  134. String? get userId => _userId;
  135. String? get userName => _userName;
  136. String? get userAvatar => _userAvatar;
  137. int? get rankNo => _rankNo;
  138. String? get amount => _amount;
  139. int? get wealthLevel => _wealthLevel;
  140. dynamic get roomId => _roomId;
  141. dynamic get isOnline => _isOnline;
  142. dynamic get animationFile => _animationFile;
  143. dynamic get role => _role;
  144. dynamic get userSex => _userSex;
  145. Map<String, dynamic> toJson() {
  146. final map = <String, dynamic>{};
  147. map['userId'] = _userId;
  148. map['userName'] = _userName;
  149. map['userAvatar'] = _userAvatar;
  150. map['rankNo'] = _rankNo;
  151. map['amount'] = _amount;
  152. map['wealthLevel'] = _wealthLevel;
  153. map['roomId'] = _roomId;
  154. map['isOnline'] = _isOnline;
  155. map['animationFile'] = _animationFile;
  156. map['role'] = _role;
  157. map['userSex'] = _userSex;
  158. return map;
  159. }
  160. }
  161. /// userId : "518741896986624"
  162. /// userName : "宁雪松16"
  163. /// userAvatar : "http://user.qn.soybean.net/avatar/518741896986624/1636968505492.png"
  164. /// rankNo : 1
  165. /// amount : "10"
  166. /// wealthLevel : 12
  167. /// roomId : null
  168. /// isOnline : 0
  169. /// animationFile : null
  170. /// role : null
  171. /// userSex : 1
  172. class DustList {
  173. DustList({
  174. String? userId,
  175. String? userName,
  176. String? userAvatar,
  177. int? rankNo,
  178. String? amount,
  179. int? wealthLevel,
  180. dynamic roomId,
  181. int? isOnline,
  182. dynamic animationFile,
  183. dynamic role,
  184. int? userSex,}){
  185. _userId = userId;
  186. _userName = userName;
  187. _userAvatar = userAvatar;
  188. _rankNo = rankNo;
  189. _amount = amount;
  190. _wealthLevel = wealthLevel;
  191. _roomId = roomId;
  192. _isOnline = isOnline;
  193. _animationFile = animationFile;
  194. _role = role;
  195. _userSex = userSex;
  196. }
  197. DustList.fromJson(dynamic json) {
  198. _userId = json['userId'];
  199. _userName = json['userName'];
  200. _userAvatar = json['userAvatar'];
  201. _rankNo = json['rankNo'];
  202. _amount = json['amount'];
  203. _wealthLevel = json['wealthLevel'];
  204. _roomId = json['roomId'];
  205. _isOnline = json['isOnline'];
  206. _animationFile = json['animationFile'];
  207. _role = json['role'];
  208. _userSex = json['userSex'];
  209. }
  210. String? _userId;
  211. String? _userName;
  212. String? _userAvatar;
  213. int? _rankNo;
  214. String? _amount;
  215. int? _wealthLevel;
  216. dynamic _roomId;
  217. int? _isOnline;
  218. dynamic _animationFile;
  219. dynamic _role;
  220. int? _userSex;
  221. String? get userId => _userId;
  222. String? get userName => _userName;
  223. String? get userAvatar => _userAvatar;
  224. int? get rankNo => _rankNo;
  225. String? get amount => _amount;
  226. int? get wealthLevel => _wealthLevel;
  227. dynamic get roomId => _roomId;
  228. int? get isOnline => _isOnline;
  229. dynamic get animationFile => _animationFile;
  230. dynamic get role => _role;
  231. int? get userSex => _userSex;
  232. Map<String, dynamic> toJson() {
  233. final map = <String, dynamic>{};
  234. map['userId'] = _userId;
  235. map['userName'] = _userName;
  236. map['userAvatar'] = _userAvatar;
  237. map['rankNo'] = _rankNo;
  238. map['amount'] = _amount;
  239. map['wealthLevel'] = _wealthLevel;
  240. map['roomId'] = _roomId;
  241. map['isOnline'] = _isOnline;
  242. map['animationFile'] = _animationFile;
  243. map['role'] = _role;
  244. map['userSex'] = _userSex;
  245. return map;
  246. }
  247. }