hour_rank_model.dart 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /// code : "OK"
  2. /// data : {"list":[{"roomId":"469212174745600","roomNo":"600385986","roomName":"66拍卖","roomCover":"http://user.qn.timichat.net/avatar/162116510154752/1628754281121.png","needPass":0,"scoreValue":"160110","rankNo":1},{"roomId":"168709150736384","roomNo":"600065143","roomName":"你想让我公共课云南咯","roomCover":"http://user.qn.timichat.net/rtc/roomCover/1625217911106.png","needPass":0,"scoreValue":"5790","rankNo":2},{"roomId":"469211897921536","roomNo":"600384163","roomName":"66派单","roomCover":"http://user.qn.timichat.net/avatar/162116510154752/1628754281121.png","needPass":0,"scoreValue":"0","rankNo":3}]}
  3. /// msg : ""
  4. /// success : true
  5. class HourRankModel {
  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. HourRankModel({
  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. HourRankModel.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 : [{"roomId":"469212174745600","roomNo":"600385986","roomName":"66拍卖","roomCover":"http://user.qn.timichat.net/avatar/162116510154752/1628754281121.png","needPass":0,"scoreValue":"160110","rankNo":1},{"roomId":"168709150736384","roomNo":"600065143","roomName":"你想让我公共课云南咯","roomCover":"http://user.qn.timichat.net/rtc/roomCover/1625217911106.png","needPass":0,"scoreValue":"5790","rankNo":2},{"roomId":"469211897921536","roomNo":"600384163","roomName":"66派单","roomCover":"http://user.qn.timichat.net/avatar/162116510154752/1628754281121.png","needPass":0,"scoreValue":"0","rankNo":3}]
  42. class Data {
  43. List<HourList>? _list;
  44. List<HourList>? get list => _list;
  45. Data({
  46. List<HourList>? 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(HourList.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. /// roomId : "469212174745600"
  66. /// roomNo : "600385986"
  67. /// roomName : "66拍卖"
  68. /// roomCover : "http://user.qn.timichat.net/avatar/162116510154752/1628754281121.png"
  69. /// needPass : 0
  70. /// scoreValue : "160110"
  71. /// rankNo : 1
  72. class HourList {
  73. String? _roomId;
  74. String? _roomNo;
  75. String? _roomName;
  76. String? _roomCover;
  77. int? _needPass;
  78. String? _scoreValue;
  79. int? _rankNo;
  80. String? get roomId => _roomId;
  81. String? get roomNo => _roomNo;
  82. String? get roomName => _roomName;
  83. String? get roomCover => _roomCover;
  84. int? get needPass => _needPass;
  85. String? get scoreValue => _scoreValue;
  86. int? get rankNo => _rankNo;
  87. HourList({
  88. String? roomId,
  89. String? roomNo,
  90. String? roomName,
  91. String? roomCover,
  92. int? needPass,
  93. String? scoreValue,
  94. int? rankNo}){
  95. _roomId = roomId;
  96. _roomNo = roomNo;
  97. _roomName = roomName;
  98. _roomCover = roomCover;
  99. _needPass = needPass;
  100. _scoreValue = scoreValue;
  101. _rankNo = rankNo;
  102. }
  103. HourList.fromJson(dynamic json) {
  104. _roomId = json['roomId'];
  105. _roomNo = json['roomNo'];
  106. _roomName = json['roomName'];
  107. _roomCover = json['roomCover'];
  108. _needPass = json['needPass'];
  109. _scoreValue = json['scoreValue'];
  110. _rankNo = json['rankNo'];
  111. }
  112. Map<String, dynamic> toJson() {
  113. var map = <String, dynamic>{};
  114. map['roomId'] = _roomId;
  115. map['roomNo'] = _roomNo;
  116. map['roomName'] = _roomName;
  117. map['roomCover'] = _roomCover;
  118. map['needPass'] = _needPass;
  119. map['scoreValue'] = _scoreValue;
  120. map['rankNo'] = _rankNo;
  121. return map;
  122. }
  123. }