Hibok
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

94 line
2.4 KiB

  1. class GroupInfoServerModel {
  2. int id;
  3. String groupName;
  4. String notice;
  5. bool isOpenMemberCheck;
  6. List<GroupServerMembers> members;
  7. GroupInfoServerModel({this.id, this.groupName, this.notice, this.members});
  8. GroupInfoServerModel.fromJson(Map<String, dynamic> json) {
  9. id = json['Id'];
  10. groupName = json['GroupName'];
  11. print('服务器群名:$groupName');
  12. notice = json['Notice'];
  13. isOpenMemberCheck = json['IsOpenMemberCheck']??false;
  14. if (json['Members'] != null) {
  15. members = new List<GroupServerMembers>();
  16. json['Members'].forEach((v) {
  17. members.add(new GroupServerMembers.fromJson(v));
  18. });
  19. }
  20. }
  21. Map<String, dynamic> toJson() {
  22. final Map<String, dynamic> data = new Map<String, dynamic>();
  23. data['Id'] = this.id;
  24. data['GroupName'] = this.groupName;
  25. data['Notice'] = this.notice;
  26. if (this.members != null) {
  27. data['Members'] = this.members.map((v) => v.toJson()).toList();
  28. }
  29. return data;
  30. }
  31. }
  32. class GroupServerMembers {
  33. BaseServerInfo info;
  34. String name;
  35. int identity;
  36. bool messageFree;
  37. bool effectiveUser;
  38. GroupServerMembers(
  39. {this.info,
  40. this.name,
  41. this.identity,
  42. this.messageFree,
  43. this.effectiveUser});
  44. GroupServerMembers.fromJson(Map<String, dynamic> json) {
  45. info = json['Info'] != null ? new BaseServerInfo.fromJson(json['Info']) : null;
  46. name = json['Name'];
  47. identity = json['Identity'];
  48. messageFree = json['MessageFree'];
  49. effectiveUser = json['EffectiveUser'];
  50. }
  51. Map<String, dynamic> toJson() {
  52. final Map<String, dynamic> data = new Map<String, dynamic>();
  53. if (this.info != null) {
  54. data['Info'] = this.info.toJson();
  55. }
  56. data['Name'] = this.name;
  57. data['Identity'] = this.identity;
  58. data['MessageFree'] = this.messageFree;
  59. data['EffectiveUser'] = this.effectiveUser;
  60. return data;
  61. }
  62. }
  63. class BaseServerInfo {
  64. int id;
  65. String niceName;
  66. String headUrl;
  67. BaseServerInfo({this.id, this.niceName, this.headUrl});
  68. BaseServerInfo.fromJson(Map<String, dynamic> json) {
  69. id = json['Id'];
  70. niceName = json['NiceName'];
  71. headUrl = json['HeadUrl'];
  72. }
  73. Map<String, dynamic> toJson() {
  74. final Map<String, dynamic> data = new Map<String, dynamic>();
  75. data['Id'] = this.id;
  76. data['NiceName'] = this.niceName;
  77. data['HeadUrl'] = this.headUrl;
  78. return data;
  79. }
  80. }