/// hostWeekRank : [{"userId":"","nickname":"","avatar":"","exp":"","isHost":false}]
/// supporterWeekRank : [{"userId":"","nickname":"","avatar":"","exp":"","isHost":false}]

class SCFamailyLeaderBoardRes {
  SCFamailyLeaderBoardRes({
      List<HostWeekRank>? hostWeekRank,
      HostWeekRank? myRankInfo,
      List<SupporterWeekRank>? supporterWeekRank,}){
    _hostWeekRank = hostWeekRank;
    _supporterWeekRank = supporterWeekRank;
    _myRankInfo = myRankInfo;
}

  SCFamailyLeaderBoardRes.fromJson(dynamic json) {
    if (json['hostWeekRank'] != null) {
      _hostWeekRank = [];
      json['hostWeekRank'].forEach((v) {
        _hostWeekRank?.add(HostWeekRank.fromJson(v));
      });
    }
    if (json['supporterWeekRank'] != null) {
      _supporterWeekRank = [];
      json['supporterWeekRank'].forEach((v) {
        _supporterWeekRank?.add(SupporterWeekRank.fromJson(v));
      });
    }
    _myRankInfo = json['myRankInfo'] != null ? HostWeekRank.fromJson(json['myRankInfo']) : null;
  }
  List<HostWeekRank>? _hostWeekRank;
  HostWeekRank? _myRankInfo;
  List<SupporterWeekRank>? _supporterWeekRank;

  List<HostWeekRank>? get hostWeekRank => _hostWeekRank;
  HostWeekRank? get myRankInfo => _myRankInfo;
  List<SupporterWeekRank>? get supporterWeekRank => _supporterWeekRank;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    if (_hostWeekRank != null) {
      map['hostWeekRank'] = _hostWeekRank?.map((v) => v.toJson()).toList();
    }
    if (_supporterWeekRank != null) {
      map['supporterWeekRank'] = _supporterWeekRank?.map((v) => v.toJson()).toList();
    }

    if (_myRankInfo != null) {
      map['myRankInfo'] = _myRankInfo?.toJson();
    }
    return map;
  }

}

/// userId : ""
/// nickname : ""
/// avatar : ""
/// exp : ""
/// isHost : false

class SupporterWeekRank {
  SupporterWeekRank({
      String? userId,
      String? account,
      String? nickname,
      String? avatar,
      String? exp,
      bool? isHost,}){
    _userId = userId;
    _account = account;
    _nickname = nickname;
    _avatar = avatar;
    _exp = exp;
    _isHost = isHost;
}

  SupporterWeekRank.fromJson(dynamic json) {
    _userId = json['userId'];
    _account = json['account'];
    _nickname = json['nickname'];
    _avatar = json['avatar'];
    _exp = json['exp'];
    _isHost = json['isHost'];
  }
  String? _userId;
  String? _account;
  String? _nickname;
  String? _avatar;
  String? _exp;
  bool? _isHost;

  String? get userId => _userId;
  String? get nickname => _nickname;
  String? get account => _account;
  String? get avatar => _avatar;
  String? get exp => _exp;
  bool? get isHost => _isHost;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = _userId;
    map['account'] = _account;
    map['nickname'] = _nickname;
    map['avatar'] = _avatar;
    map['exp'] = _exp;
    map['isHost'] = _isHost;
    return map;
  }

}

/// userId : ""
/// nickname : ""
/// avatar : ""
/// exp : ""
/// isHost : false

class HostWeekRank {
  HostWeekRank({
      String? userId,
      String? account,
      String? nickname,
      String? avatar,
      String? exp,
      String? rank,
      bool? isHost,}){
    _userId = userId;
    _account = account;
    _nickname = nickname;
    _avatar = avatar;
    _exp = exp;
    _rank = rank;
    _isHost = isHost;
}

  HostWeekRank.fromJson(dynamic json) {
    _userId = json['userId'];
    _account = json['account'];
    _nickname = json['nickname'];
    _avatar = json['avatar'];
    _exp = json['exp'];
    _rank = json['rank'];
    _isHost = json['isHost'];
  }
  String? _userId;
  String? _account;
  String? _nickname;
  String? _avatar;
  String? _exp;
  String? _rank;
  bool? _isHost;

  String? get userId => _userId;
  String? get account => _account;
  String? get nickname => _nickname;
  String? get avatar => _avatar;
  String? get exp => _exp;
  String? get rank => _rank;
  bool? get isHost => _isHost;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['userId'] = _userId;
    map['account'] = _account;
    map['nickname'] = _nickname;
    map['avatar'] = _avatar;
    map['exp'] = _exp;
    map['rank'] = _rank;
    map['isHost'] = _isHost;
    return map;
  }

}