chat_room_managers_model.dart 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /// code : "OK"
  2. /// data : {"list":[{"userId":"45455484387398","userName":"可爱多拍死你是咯破了","userAvatar":"http://user.qn.timichat.com/avatar/default_female.png","roomRole":2,"wealthLevel":40,"userNo":"10584078","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"46898215911486","userName":"尔豪","userAvatar":"http://user.qn.timichat.net/avatar/46898215911486/1611992024031.png","roomRole":2,"wealthLevel":42,"userNo":"10142351","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"141075591200768","userName":"大卡车72😲","userAvatar":"http://user.qn.timichat.net/avatar/141075591200768/1631690468269.png","roomRole":2,"wealthLevel":35,"userNo":"10878114","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"309226563960832","userName":"尉迟浩然","userAvatar":"http://user.qn.timichat.com/avatar/default_male.png","roomRole":2,"wealthLevel":9,"userNo":"10895886","userSex":null,"channelName":null,"headwearAnimationId":null}]}
  3. /// msg : ""
  4. /// success : true
  5. class ChatRoomManagersModel {
  6. dynamic? _code;
  7. Data? _data;
  8. String? _msg;
  9. bool? _success;
  10. dynamic? get code => _code;
  11. Data? get data => _data;
  12. String? get msg => _msg;
  13. bool? get success => _success;
  14. ChatRoomManagersModel({
  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. ChatRoomManagersModel.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":"45455484387398","userName":"可爱多拍死你是咯破了","userAvatar":"http://user.qn.timichat.com/avatar/default_female.png","roomRole":2,"wealthLevel":40,"userNo":"10584078","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"46898215911486","userName":"尔豪","userAvatar":"http://user.qn.timichat.net/avatar/46898215911486/1611992024031.png","roomRole":2,"wealthLevel":42,"userNo":"10142351","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"141075591200768","userName":"大卡车72😲","userAvatar":"http://user.qn.timichat.net/avatar/141075591200768/1631690468269.png","roomRole":2,"wealthLevel":35,"userNo":"10878114","userSex":null,"channelName":null,"headwearAnimationId":null},{"userId":"309226563960832","userName":"尉迟浩然","userAvatar":"http://user.qn.timichat.com/avatar/default_male.png","roomRole":2,"wealthLevel":9,"userNo":"10895886","userSex":null,"channelName":null,"headwearAnimationId":null}]
  42. class Data {
  43. List<RoomManagersInfo>? _list;
  44. List<RoomManagersInfo>? get list => _list;
  45. Data({
  46. List<RoomManagersInfo>? 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(RoomManagersInfo.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 : "45455484387398"
  66. /// userName : "可爱多拍死你是咯破了"
  67. /// userAvatar : "http://user.qn.timichat.com/avatar/default_female.png"
  68. /// roomRole : 2
  69. /// wealthLevel : 40
  70. /// userNo : "10584078"
  71. /// userSex : null
  72. /// channelName : null
  73. /// headwearAnimationId : null
  74. class RoomManagersInfo{
  75. String? _userId;
  76. String? _userName;
  77. String? _userAvatar;
  78. int? _roomRole;
  79. int? _wealthLevel;
  80. String? _userNo;
  81. dynamic? _userSex;
  82. dynamic? _channelName;
  83. dynamic? _headwearAnimationId;
  84. String? get userId => _userId;
  85. String? get userName => _userName;
  86. String? get userAvatar => _userAvatar;
  87. int? get roomRole => _roomRole;
  88. int? get wealthLevel => _wealthLevel;
  89. String? get userNo => _userNo;
  90. dynamic? get userSex => _userSex;
  91. dynamic? get channelName => _channelName;
  92. dynamic? get headwearAnimationId => _headwearAnimationId;
  93. RoomManagersInfo({
  94. String? userId,
  95. String? userName,
  96. String? userAvatar,
  97. int? roomRole,
  98. int? wealthLevel,
  99. String? userNo,
  100. dynamic? userSex,
  101. dynamic? channelName,
  102. dynamic? headwearAnimationId}){
  103. _userId = userId;
  104. _userName = userName;
  105. _userAvatar = userAvatar;
  106. _roomRole = roomRole;
  107. _wealthLevel = wealthLevel;
  108. _userNo = userNo;
  109. _userSex = userSex;
  110. _channelName = channelName;
  111. _headwearAnimationId = headwearAnimationId;
  112. }
  113. RoomManagersInfo.fromJson(dynamic json) {
  114. _userId = json['userId'];
  115. _userName = json['userName'];
  116. _userAvatar = json['userAvatar'];
  117. _roomRole = json['roomRole'];
  118. _wealthLevel = json['wealthLevel'];
  119. _userNo = json['userNo'];
  120. _userSex = json['userSex'];
  121. _channelName = json['channelName'];
  122. _headwearAnimationId = json['headwearAnimationId'];
  123. }
  124. Map<String, dynamic> toJson() {
  125. var map = <String, dynamic>{};
  126. map['userId'] = _userId;
  127. map['userName'] = _userName;
  128. map['userAvatar'] = _userAvatar;
  129. map['roomRole'] = _roomRole;
  130. map['wealthLevel'] = _wealthLevel;
  131. map['userNo'] = _userNo;
  132. map['userSex'] = _userSex;
  133. map['channelName'] = _channelName;
  134. map['headwearAnimationId'] = _headwearAnimationId;
  135. return map;
  136. }
  137. }