427 lines
11 KiB
Dart
427 lines
11 KiB
Dart
/// familyId : ""
|
|
/// familyAccount : ""
|
|
/// familyAvatar : ""
|
|
/// familyName : ""
|
|
/// familyIntro : ""
|
|
/// familyNotice : ""
|
|
/// familyAdmin : {"userId":"","account":"","specialAccount":"","userAvatar":"","userNickName":""}
|
|
/// currentExp : ""
|
|
/// currentMember : 0
|
|
/// familyLevel : 0
|
|
/// levelExp : ""
|
|
/// avatarFrameCover : ""
|
|
/// avatarFrameSvg : ""
|
|
/// badgeCover : ""
|
|
/// badgeSvg : ""
|
|
/// maxMember : 0
|
|
/// levelBackgroundPicture : ""
|
|
/// boxInfo : {"contributeCount":0,"userContributed":false,"chests":[{"level":0,"requiredCount":0,"rewardGold":0,"unlocked":false,"claimed":false}]}
|
|
/// memberList : {"hosts":[{"userId":"","userAvatar":""}],"supporters":[{"userId":"","userAvatar":""}]}
|
|
/// amount : 0.0
|
|
|
|
class ChatVibeFamilyBaseInfoRes {
|
|
ChatVibeFamilyBaseInfoRes({
|
|
String? familyId,
|
|
String? familyAccount,
|
|
String? familyAvatar,
|
|
String? familyName,
|
|
String? familyIntro,
|
|
String? familyNotice,
|
|
FamilyAdmin? familyAdmin,
|
|
String? currentExp,
|
|
num? currentMember,
|
|
int? familyLevel,
|
|
bool? joinWaiting,
|
|
String? levelExp,
|
|
String? avatarFrameCover,
|
|
String? avatarFrameSvg,
|
|
String? badgeCover,
|
|
String? badgeSvg,
|
|
String? myFamilyRole,
|
|
num? maxMember,
|
|
String? levelBackgroundPicture,
|
|
BoxInfo? boxInfo,
|
|
MemberList? memberList,
|
|
num? amount,}){
|
|
_familyId = familyId;
|
|
_familyAccount = familyAccount;
|
|
_familyAvatar = familyAvatar;
|
|
_familyName = familyName;
|
|
_familyIntro = familyIntro;
|
|
_familyNotice = familyNotice;
|
|
_familyAdmin = familyAdmin;
|
|
_currentExp = currentExp;
|
|
_currentMember = currentMember;
|
|
_familyLevel = familyLevel;
|
|
_levelExp = levelExp;
|
|
_joinWaiting = joinWaiting;
|
|
_avatarFrameCover = avatarFrameCover;
|
|
_avatarFrameSvg = avatarFrameSvg;
|
|
_badgeCover = badgeCover;
|
|
_badgeSvg = badgeSvg;
|
|
_myFamilyRole = myFamilyRole;
|
|
_maxMember = maxMember;
|
|
_levelBackgroundPicture = levelBackgroundPicture;
|
|
_boxInfo = boxInfo;
|
|
_memberList = memberList;
|
|
_amount = amount;
|
|
}
|
|
|
|
ChatVibeFamilyBaseInfoRes.fromJson(dynamic json) {
|
|
_familyId = json['familyId'];
|
|
_familyAccount = json['familyAccount'];
|
|
_familyAvatar = json['familyAvatar'];
|
|
_familyName = json['familyName'];
|
|
_familyIntro = json['familyIntro'];
|
|
_familyNotice = json['familyNotice'];
|
|
_familyAdmin = json['familyAdmin'] != null ? FamilyAdmin.fromJson(json['familyAdmin']) : null;
|
|
_currentExp = json['currentExp'];
|
|
_currentMember = json['currentMember'];
|
|
_familyLevel = json['familyLevel'];
|
|
_levelExp = json['levelExp'];
|
|
_joinWaiting = json['joinWaiting'];
|
|
_avatarFrameCover = json['avatarFrameCover'];
|
|
_avatarFrameSvg = json['avatarFrameSvg'];
|
|
_badgeCover = json['badgeCover'];
|
|
_badgeSvg = json['badgeSvg'];
|
|
_myFamilyRole = json['myFamilyRole'];
|
|
_maxMember = json['maxMember'];
|
|
_maxAdmin = json['maxAdmin'];
|
|
_levelBackgroundPicture = json['levelBackgroundPicture'];
|
|
_boxInfo = json['boxInfo'] != null ? BoxInfo.fromJson(json['boxInfo']) : null;
|
|
_memberList = json['memberList'] != null ? MemberList.fromJson(json['memberList']) : null;
|
|
_amount = json['amount'];
|
|
}
|
|
String? _familyId;
|
|
String? _familyAccount;
|
|
String? _familyAvatar;
|
|
String? _familyName;
|
|
String? _familyIntro;
|
|
String? _familyNotice;
|
|
FamilyAdmin? _familyAdmin;
|
|
String? _currentExp;
|
|
num? _currentMember;
|
|
bool? _joinWaiting;
|
|
int? _familyLevel;
|
|
String? _levelExp;
|
|
String? _avatarFrameCover;
|
|
String? _avatarFrameSvg;
|
|
String? _badgeCover;
|
|
String? _badgeSvg;
|
|
String? _myFamilyRole;
|
|
num? _maxMember;
|
|
num? _maxAdmin;
|
|
String? _levelBackgroundPicture;
|
|
BoxInfo? _boxInfo;
|
|
MemberList? _memberList;
|
|
num? _amount;
|
|
|
|
String? get familyId => _familyId;
|
|
bool? get joinWaiting => _joinWaiting;
|
|
String? get familyAccount => _familyAccount;
|
|
String? get familyAvatar => _familyAvatar;
|
|
String? get familyName => _familyName;
|
|
String? get familyIntro => _familyIntro;
|
|
String? get familyNotice => _familyNotice;
|
|
FamilyAdmin? get familyAdmin => _familyAdmin;
|
|
String? get currentExp => _currentExp;
|
|
num? get currentMember => _currentMember;
|
|
int? get familyLevel => _familyLevel;
|
|
String? get levelExp => _levelExp;
|
|
String? get avatarFrameCover => _avatarFrameCover;
|
|
String? get avatarFrameSvg => _avatarFrameSvg;
|
|
String? get badgeCover => _badgeCover;
|
|
String? get badgeSvg => _badgeSvg;
|
|
String? get myFamilyRole => _myFamilyRole;
|
|
num? get maxMember => _maxMember;
|
|
num? get maxAdmin => _maxAdmin;
|
|
String? get levelBackgroundPicture => _levelBackgroundPicture;
|
|
BoxInfo? get boxInfo => _boxInfo;
|
|
MemberList? get memberList => _memberList;
|
|
num? get amount => _amount;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['familyId'] = _familyId;
|
|
map['familyAccount'] = _familyAccount;
|
|
map['familyAvatar'] = _familyAvatar;
|
|
map['familyName'] = _familyName;
|
|
map['joinWaiting'] = _joinWaiting;
|
|
map['familyIntro'] = _familyIntro;
|
|
map['familyNotice'] = _familyNotice;
|
|
if (_familyAdmin != null) {
|
|
map['familyAdmin'] = _familyAdmin?.toJson();
|
|
}
|
|
map['currentExp'] = _currentExp;
|
|
map['currentMember'] = _currentMember;
|
|
map['familyLevel'] = _familyLevel;
|
|
map['levelExp'] = _levelExp;
|
|
map['avatarFrameCover'] = _avatarFrameCover;
|
|
map['avatarFrameSvg'] = _avatarFrameSvg;
|
|
map['badgeCover'] = _badgeCover;
|
|
map['badgeSvg'] = _badgeSvg;
|
|
map['myFamilyRole'] = _myFamilyRole;
|
|
map['maxMember'] = _maxMember;
|
|
map['maxAdmin'] = _maxAdmin;
|
|
map['levelBackgroundPicture'] = _levelBackgroundPicture;
|
|
if (_boxInfo != null) {
|
|
map['boxInfo'] = _boxInfo?.toJson();
|
|
}
|
|
if (_memberList != null) {
|
|
map['memberList'] = _memberList?.toJson();
|
|
}
|
|
map['amount'] = _amount;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// hosts : [{"userId":"","userAvatar":""}]
|
|
/// supporters : [{"userId":"","userAvatar":""}]
|
|
|
|
class MemberList {
|
|
MemberList({
|
|
List<Hosts>? hosts,
|
|
List<Supporters>? supporters,}){
|
|
_hosts = hosts;
|
|
_supporters = supporters;
|
|
}
|
|
|
|
MemberList.fromJson(dynamic json) {
|
|
if (json['hosts'] != null) {
|
|
_hosts = [];
|
|
json['hosts'].forEach((v) {
|
|
_hosts?.add(Hosts.fromJson(v));
|
|
});
|
|
}
|
|
if (json['supporters'] != null) {
|
|
_supporters = [];
|
|
json['supporters'].forEach((v) {
|
|
_supporters?.add(Supporters.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
List<Hosts>? _hosts;
|
|
List<Supporters>? _supporters;
|
|
|
|
List<Hosts>? get hosts => _hosts;
|
|
List<Supporters>? get supporters => _supporters;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
if (_hosts != null) {
|
|
map['hosts'] = _hosts?.map((v) => v.toJson()).toList();
|
|
}
|
|
if (_supporters != null) {
|
|
map['supporters'] = _supporters?.map((v) => v.toJson()).toList();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// userId : ""
|
|
/// userAvatar : ""
|
|
|
|
class Supporters {
|
|
Supporters({
|
|
String? userId,
|
|
String? userAvatar,}){
|
|
_userId = userId;
|
|
_userAvatar = userAvatar;
|
|
}
|
|
|
|
Supporters.fromJson(dynamic json) {
|
|
_userId = json['userId'];
|
|
_userAvatar = json['userAvatar'];
|
|
}
|
|
String? _userId;
|
|
String? _userAvatar;
|
|
|
|
String? get userId => _userId;
|
|
String? get userAvatar => _userAvatar;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['userId'] = _userId;
|
|
map['userAvatar'] = _userAvatar;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// userId : ""
|
|
/// userAvatar : ""
|
|
|
|
class Hosts {
|
|
Hosts({
|
|
String? userId,
|
|
String? userAvatar,}){
|
|
_userId = userId;
|
|
_userAvatar = userAvatar;
|
|
}
|
|
|
|
Hosts.fromJson(dynamic json) {
|
|
_userId = json['userId'];
|
|
_userAvatar = json['userAvatar'];
|
|
}
|
|
String? _userId;
|
|
String? _userAvatar;
|
|
|
|
String? get userId => _userId;
|
|
String? get userAvatar => _userAvatar;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['userId'] = _userId;
|
|
map['userAvatar'] = _userAvatar;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// contributeCount : 0
|
|
/// userContributed : false
|
|
/// chests : [{"level":0,"requiredCount":0,"rewardGold":0,"unlocked":false,"claimed":false}]
|
|
|
|
class BoxInfo {
|
|
BoxInfo({
|
|
int? contributeCount,
|
|
bool? userContributed,
|
|
List<Chests>? chests,}){
|
|
_contributeCount = contributeCount;
|
|
_userContributed = userContributed;
|
|
_chests = chests;
|
|
}
|
|
|
|
BoxInfo.fromJson(dynamic json) {
|
|
_contributeCount = json['contributeCount'];
|
|
_userContributed = json['userContributed'];
|
|
if (json['chests'] != null) {
|
|
_chests = [];
|
|
json['chests'].forEach((v) {
|
|
_chests?.add(Chests.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
int? _contributeCount;
|
|
bool? _userContributed;
|
|
List<Chests>? _chests;
|
|
|
|
int? get contributeCount => _contributeCount;
|
|
bool? get userContributed => _userContributed;
|
|
List<Chests>? get chests => _chests;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['contributeCount'] = _contributeCount;
|
|
map['userContributed'] = _userContributed;
|
|
if (_chests != null) {
|
|
map['chests'] = _chests?.map((v) => v.toJson()).toList();
|
|
}
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// level : 0
|
|
/// requiredCount : 0
|
|
/// rewardGold : 0
|
|
/// unlocked : false
|
|
/// claimed : false
|
|
|
|
class Chests {
|
|
Chests({
|
|
num? level,
|
|
int? requiredCount,
|
|
num? rewardGold,
|
|
bool? unlocked,
|
|
bool? claimed,}){
|
|
_level = level;
|
|
_requiredCount = requiredCount;
|
|
_rewardGold = rewardGold;
|
|
_unlocked = unlocked;
|
|
_claimed = claimed;
|
|
}
|
|
|
|
Chests.fromJson(dynamic json) {
|
|
_level = json['level'];
|
|
_requiredCount = json['requiredCount'];
|
|
_rewardGold = json['rewardGold'];
|
|
_unlocked = json['unlocked'];
|
|
_claimed = json['claimed'];
|
|
}
|
|
num? _level;
|
|
int? _requiredCount;
|
|
num? _rewardGold;
|
|
bool? _unlocked;
|
|
bool? _claimed;
|
|
|
|
num? get level => _level;
|
|
int? get requiredCount => _requiredCount;
|
|
num? get rewardGold => _rewardGold;
|
|
bool? get unlocked => _unlocked;
|
|
bool? get claimed => _claimed;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['level'] = _level;
|
|
map['requiredCount'] = _requiredCount;
|
|
map['rewardGold'] = _rewardGold;
|
|
map['unlocked'] = _unlocked;
|
|
map['claimed'] = _claimed;
|
|
return map;
|
|
}
|
|
|
|
}
|
|
|
|
/// userId : ""
|
|
/// account : ""
|
|
/// specialAccount : ""
|
|
/// userAvatar : ""
|
|
/// userNickName : ""
|
|
|
|
class FamilyAdmin {
|
|
FamilyAdmin({
|
|
String? userId,
|
|
String? account,
|
|
String? specialAccount,
|
|
String? userAvatar,
|
|
String? userNickName,}){
|
|
_userId = userId;
|
|
_account = account;
|
|
_specialAccount = specialAccount;
|
|
_userAvatar = userAvatar;
|
|
_userNickName = userNickName;
|
|
}
|
|
|
|
FamilyAdmin.fromJson(dynamic json) {
|
|
_userId = json['userId'];
|
|
_account = json['account'];
|
|
_specialAccount = json['specialAccount'];
|
|
_userAvatar = json['userAvatar'];
|
|
_userNickName = json['userNickName'];
|
|
}
|
|
String? _userId;
|
|
String? _account;
|
|
String? _specialAccount;
|
|
String? _userAvatar;
|
|
String? _userNickName;
|
|
|
|
String? get userId => _userId;
|
|
String? get account => _account;
|
|
String? get specialAccount => _specialAccount;
|
|
String? get userAvatar => _userAvatar;
|
|
String? get userNickName => _userNickName;
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final map = <String, dynamic>{};
|
|
map['userId'] = _userId;
|
|
map['account'] = _account;
|
|
map['specialAccount'] = _specialAccount;
|
|
map['userAvatar'] = _userAvatar;
|
|
map['userNickName'] = _userNickName;
|
|
return map;
|
|
}
|
|
|
|
} |