import 'package:yumi/shared/business_logic/models/res/login_res.dart';

/// agent : false
/// anchor : false
/// follow : false
/// friend : false
/// ktvIntegral : ""
/// roomRole : ""
/// supperVip : ""
/// useBadge : [{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]
/// useProps : [{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}]
/// userLevel : {"charmLevel":0,"extValues":{"":{}},"wealthLevel":0}
/// userProfile : {"account":"","accountStatus":"","age":0,"bornDay":0,"bornMonth":0,"bornYear":0,"countryCode":"","countryId":0,"countryName":"","createTime":0,"del":false,"freezingTime":0,"id":"0","originSys":"","ownSpecialId":{"account":"","expiredTime":0},"sameRegion":false,"sysOriginChild":"","useProps":[{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}],"userAvatar":"","userNickname":"","userSex":0,"wearBadge":[{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]}

class  RoomUserCardRes {
  RoomUserCardRes({
      bool? agent,
      bool? anchor,
      bool? follow,
      bool? friend,
      String? ktvIntegral,
      String? roomRole,
      String? supperVip,
      List<UseBadge>? useBadge,
      List<UseProps>? useProps,
      UserLevel? userLevel,
      SocialChatUserProfile? userProfile,}){
    _agent = agent;
    _anchor = anchor;
    _follow = follow;
    _friend = friend;
    _ktvIntegral = ktvIntegral;
    _roomRole = roomRole;
    _supperVip = supperVip;
    _useBadge = useBadge;
    _useProps = useProps;
    _userLevel = userLevel;
    _userProfile = userProfile;
}

  RoomUserCardRes.fromJson(dynamic json) {
    _agent = json['agent'];
    _anchor = json['anchor'];
    _follow = json['follow'];
    _friend = json['friend'];
    _ktvIntegral = json['ktvIntegral'];
    _roomRole = json['roomRole'];
    _supperVip = json['supperVip'];
    if (json['useBadge'] != null) {
      _useBadge = [];
      json['useBadge'].forEach((v) {
        _useBadge?.add(UseBadge.fromJson(v));
      });
    }
    if (json['useProps'] != null) {
      _useProps = [];
      json['useProps'].forEach((v) {
        _useProps?.add(UseProps.fromJson(v));
      });
    }
    _userLevel = json['userLevel'] != null ? UserLevel.fromJson(json['userLevel']) : null;
    _userProfile = json['userProfile'] != null ? SocialChatUserProfile.fromJson(json['userProfile']) : null;
  }
  bool? _agent;
  bool? _anchor;
  bool? _follow;
  bool? _friend;
  String? _ktvIntegral;
  String? _roomRole;
  String? _supperVip;
  List<UseBadge>? _useBadge;
  List<UseProps>? _useProps;
  UserLevel? _userLevel;
  SocialChatUserProfile? _userProfile;
RoomUserCardRes copyWith({  bool? agent,
  bool? anchor,
  bool? follow,
  bool? friend,
  String? ktvIntegral,
  String? roomRole,
  String? supperVip,
  List<UseBadge>? useBadge,
  List<UseProps>? useProps,
  UserLevel? userLevel,
  SocialChatUserProfile? userProfile,
}) => RoomUserCardRes(  agent: agent ?? _agent,
  anchor: anchor ?? _anchor,
  follow: follow ?? _follow,
  friend: friend ?? _friend,
  ktvIntegral: ktvIntegral ?? _ktvIntegral,
  roomRole: roomRole ?? _roomRole,
  supperVip: supperVip ?? _supperVip,
  useBadge: useBadge ?? _useBadge,
  useProps: useProps ?? _useProps,
  userLevel: userLevel ?? _userLevel,
  userProfile: userProfile ?? _userProfile,
);
  bool? get agent => _agent;
  bool? get anchor => _anchor;
  bool? get follow => _follow;
  bool? get friend => _friend;
  String? get ktvIntegral => _ktvIntegral;
  String? get roomRole => _roomRole;
  String? get supperVip => _supperVip;
  List<UseBadge>? get useBadge => _useBadge;
  List<UseProps>? get useProps => _useProps;
  UserLevel? get userLevel => _userLevel;
  SocialChatUserProfile? get userProfile => _userProfile;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['agent'] = _agent;
    map['anchor'] = _anchor;
    map['follow'] = _follow;
    map['friend'] = _friend;
    map['ktvIntegral'] = _ktvIntegral;
    map['roomRole'] = _roomRole;
    map['supperVip'] = _supperVip;
    if (_useBadge != null) {
      map['useBadge'] = _useBadge?.map((v) => v.toJson()).toList();
    }
    if (_useProps != null) {
      map['useProps'] = _useProps?.map((v) => v.toJson()).toList();
    }
    if (_userLevel != null) {
      map['userLevel'] = _userLevel?.toJson();
    }
    if (_userProfile != null) {
      map['userProfile'] = _userProfile?.toJson();
    }
    return map;
  }

}

/// account : ""
/// accountStatus : ""
/// age : 0
/// bornDay : 0
/// bornMonth : 0
/// bornYear : 0
/// countryCode : ""
/// countryId : 0
/// countryName : ""
/// createTime : 0
/// del : false
/// freezingTime : 0
/// id : "0"
/// originSys : ""
/// ownSpecialId : {"account":"","expiredTime":0}
/// sameRegion : false
/// sysOriginChild : ""
/// useProps : [{"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""},"userId":0}]
/// userAvatar : ""
/// userNickname : ""
/// userSex : 0
/// wearBadge : [{"animationUrl":"","badgeKey":"","badgeLevel":0,"badgeName":"","expireTime":0,"id":0,"milestone":0,"notSelectUrl":"","selectUrl":"","type":"","userId":0}]

/// animationUrl : ""
/// badgeKey : ""
/// badgeLevel : 0
/// badgeName : ""
/// expireTime : 0
/// id : 0
/// milestone : 0
/// notSelectUrl : ""
/// selectUrl : ""
/// type : ""
/// userId : 0

class WearBadge {
  WearBadge({
      String? animationUrl,
      String? badgeKey,
      num? badgeLevel,
      String? badgeName,
      num? expireTime,
      num? id,
      num? milestone,
      String? notSelectUrl,
      String? selectUrl,
      String? type,
      num? userId,}){
    _animationUrl = animationUrl;
    _badgeKey = badgeKey;
    _badgeLevel = badgeLevel;
    _badgeName = badgeName;
    _expireTime = expireTime;
    _id = id;
    _milestone = milestone;
    _notSelectUrl = notSelectUrl;
    _selectUrl = selectUrl;
    _type = type;
    _userId = userId;
}

  WearBadge.fromJson(dynamic json) {
    _animationUrl = json['animationUrl'];
    _badgeKey = json['badgeKey'];
    _badgeLevel = json['badgeLevel'];
    _badgeName = json['badgeName'];
    _expireTime = json['expireTime'];
    _id = json['id'];
    _milestone = json['milestone'];
    _notSelectUrl = json['notSelectUrl'];
    _selectUrl = json['selectUrl'];
    _type = json['type'];
    _userId = json['userId'];
  }
  String? _animationUrl;
  String? _badgeKey;
  num? _badgeLevel;
  String? _badgeName;
  num? _expireTime;
  num? _id;
  num? _milestone;
  String? _notSelectUrl;
  String? _selectUrl;
  String? _type;
  num? _userId;
WearBadge copyWith({  String? animationUrl,
  String? badgeKey,
  num? badgeLevel,
  String? badgeName,
  num? expireTime,
  num? id,
  num? milestone,
  String? notSelectUrl,
  String? selectUrl,
  String? type,
  num? userId,
}) => WearBadge(  animationUrl: animationUrl ?? _animationUrl,
  badgeKey: badgeKey ?? _badgeKey,
  badgeLevel: badgeLevel ?? _badgeLevel,
  badgeName: badgeName ?? _badgeName,
  expireTime: expireTime ?? _expireTime,
  id: id ?? _id,
  milestone: milestone ?? _milestone,
  notSelectUrl: notSelectUrl ?? _notSelectUrl,
  selectUrl: selectUrl ?? _selectUrl,
  type: type ?? _type,
  userId: userId ?? _userId,
);
  String? get animationUrl => _animationUrl;
  String? get badgeKey => _badgeKey;
  num? get badgeLevel => _badgeLevel;
  String? get badgeName => _badgeName;
  num? get expireTime => _expireTime;
  num? get id => _id;
  num? get milestone => _milestone;
  String? get notSelectUrl => _notSelectUrl;
  String? get selectUrl => _selectUrl;
  String? get type => _type;
  num? get userId => _userId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['animationUrl'] = _animationUrl;
    map['badgeKey'] = _badgeKey;
    map['badgeLevel'] = _badgeLevel;
    map['badgeName'] = _badgeName;
    map['expireTime'] = _expireTime;
    map['id'] = _id;
    map['milestone'] = _milestone;
    map['notSelectUrl'] = _notSelectUrl;
    map['selectUrl'] = _selectUrl;
    map['type'] = _type;
    map['userId'] = _userId;
    return map;
  }

}

class UserLevel {
  UserLevel({
      num? charmLevel,
      num? wealthLevel,}){
    _charmLevel = charmLevel;
    _wealthLevel = wealthLevel;
}

  UserLevel.fromJson(dynamic json) {
    _charmLevel = json['charmLevel'];
    _wealthLevel = json['wealthLevel'];
  }
  num? _charmLevel;
  num? _wealthLevel;
UserLevel copyWith({  num? charmLevel,
  num? wealthLevel,
}) => UserLevel(  charmLevel: charmLevel ?? _charmLevel,
  wealthLevel: wealthLevel ?? _wealthLevel,
);
  num? get charmLevel => _charmLevel;
  num? get wealthLevel => _wealthLevel;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['charmLevel'] = _charmLevel;
    map['wealthLevel'] = _wealthLevel;
    return map;
  }

}

class UseBadge {
  UseBadge({
      String? animationUrl,
      String? badgeKey,
      num? badgeLevel,
      String? badgeName,
      num? expireTime,
      String? id,
      String? milestone,
      String? notSelectUrl,
      String? selectUrl,
      String? type,
      String? userId,}){
    _animationUrl = animationUrl;
    _badgeKey = badgeKey;
    _badgeLevel = badgeLevel;
    _badgeName = badgeName;
    _expireTime = expireTime;
    _id = id;
    _milestone = milestone;
    _notSelectUrl = notSelectUrl;
    _selectUrl = selectUrl;
    _type = type;
    _userId = userId;
}

  UseBadge.fromJson(dynamic json) {
    _animationUrl = json['animationUrl'];
    _badgeKey = json['badgeKey'];
    _badgeLevel = json['badgeLevel'];
    _badgeName = json['badgeName'];
    _expireTime = json['expireTime'];
    _id = json['id'];
    _milestone = json['milestone'];
    _notSelectUrl = json['notSelectUrl'];
    _selectUrl = json['selectUrl'];
    _type = json['type'];
    _userId = json['userId'];
  }
  String? _animationUrl;
  String? _badgeKey;
  num? _badgeLevel;
  String? _badgeName;
  num? _expireTime;
  String? _id;
  String? _milestone;
  String? _notSelectUrl;
  String? _selectUrl;
  String? _type;
  String? _userId;
UseBadge copyWith({  String? animationUrl,
  String? badgeKey,
  num? badgeLevel,
  String? badgeName,
  num? expireTime,
  String? id,
  String? milestone,
  String? notSelectUrl,
  String? selectUrl,
  String? type,
  String? userId,
}) => UseBadge(  animationUrl: animationUrl ?? _animationUrl,
  badgeKey: badgeKey ?? _badgeKey,
  badgeLevel: badgeLevel ?? _badgeLevel,
  badgeName: badgeName ?? _badgeName,
  expireTime: expireTime ?? _expireTime,
  id: id ?? _id,
  milestone: milestone ?? _milestone,
  notSelectUrl: notSelectUrl ?? _notSelectUrl,
  selectUrl: selectUrl ?? _selectUrl,
  type: type ?? _type,
  userId: userId ?? _userId,
);
  String? get animationUrl => _animationUrl;
  String? get badgeKey => _badgeKey;
  num? get badgeLevel => _badgeLevel;
  String? get badgeName => _badgeName;
  num? get expireTime => _expireTime;
  String? get id => _id;
  String? get milestone => _milestone;
  String? get notSelectUrl => _notSelectUrl;
  String? get selectUrl => _selectUrl;
  String? get type => _type;
  String? get userId => _userId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['animationUrl'] = _animationUrl;
    map['badgeKey'] = _badgeKey;
    map['badgeLevel'] = _badgeLevel;
    map['badgeName'] = _badgeName;
    map['expireTime'] = _expireTime;
    map['id'] = _id;
    map['milestone'] = _milestone;
    map['notSelectUrl'] = _notSelectUrl;
    map['selectUrl'] = _selectUrl;
    map['type'] = _type;
    map['userId'] = _userId;
    return map;
  }

}