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

/// id : 0
/// mutualRelations : false
/// useProps : [{"allowGive":false,"expireTime":0,"propsResources":{"amount":0.0,"code":"","cover":"","createTime":0,"del":false,"expand":"","id":0,"imNotOpenedUrl":"","imOpenedUrl":"","imOpenedUrlTwo":"","imSendCoverUrl":"","name":"","roomNotOpenedUrl":"","roomOpenedUrl":"","roomSendCoverUrl":"","sourceUrl":"","sysOrigin":"","type":"","updateTime":0},"userId":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 FollowUserRes {
  FollowUserRes({
      String? id,
      bool? mutualRelations,
      List<UseProps>? useProps,
      SocialChatUserProfile? userProfile,}){
    _id = id;
    _mutualRelations = mutualRelations;
    _useProps = useProps;
    _userProfile = userProfile;
}

  FollowUserRes.fromJson(dynamic json) {
    _id = json['id'];
    _mutualRelations = json['mutualRelations'];
    if (json['useProps'] != null) {
      _useProps = [];
      json['useProps'].forEach((v) {
        _useProps?.add(UseProps.fromJson(v));
      });
    }
    _userProfile = json['userProfile'] != null ? SocialChatUserProfile.fromJson(json['userProfile']) : null;
  }
  String? _id;
  bool? _mutualRelations;
  List<UseProps>? _useProps;
  SocialChatUserProfile? _userProfile;
FollowUserRes copyWith({  String? id,
  bool? mutualRelations,
  List<UseProps>? useProps,
  SocialChatUserProfile? userProfile,
}) => FollowUserRes(  id: id ?? _id,
  mutualRelations: mutualRelations ?? _mutualRelations,
  useProps: useProps ?? _useProps,
  userProfile: userProfile ?? _userProfile,
);
  String? get id => _id;
  bool? get mutualRelations => _mutualRelations;
  List<UseProps>? get useProps => _useProps;
  SocialChatUserProfile? get userProfile => _userProfile;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['id'] = _id;
    map['mutualRelations'] = _mutualRelations;
    if (_useProps != null) {
      map['useProps'] = _useProps?.map((v) => v.toJson()).toList();
    }
    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,
      String? expireTime,
      num? id,
      num? 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;
}

  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;
  String? _expireTime;
  num? _id;
  num? _milestone;
  String? _notSelectUrl;
  String? _selectUrl;
  String? _type;
  String? _userId;
WearBadge copyWith({  String? animationUrl,
  String? badgeKey,
  num? badgeLevel,
  String? badgeName,
  String? expireTime,
  num? id,
  num? milestone,
  String? notSelectUrl,
  String? selectUrl,
  String? type,
  String? 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;
  String? get expireTime => _expireTime;
  num? get id => _id;
  num? 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;
  }

}

/// expireTime : 0
/// propsResources : {"amount":0.0,"code":"","cover":"","expand":"","id":0,"name":"","sourceUrl":"","type":""}
/// userId : 0

class UseProps {
  UseProps({
      String? expireTime,
      PropsResources? propsResources,
      String? userId,}){
    _expireTime = expireTime;
    _propsResources = propsResources;
    _userId = userId;
}

  UseProps.fromJson(dynamic json) {
    _expireTime = json['expireTime'];
    _propsResources = json['propsResources'] != null ? PropsResources.fromJson(json['propsResources']) : null;
    _userId = json['userId'];
  }
  String? _expireTime;
  PropsResources? _propsResources;
  String? _userId;
UseProps copyWith({  String? expireTime,
  PropsResources? propsResources,
  String? userId,
}) => UseProps(  expireTime: expireTime ?? _expireTime,
  propsResources: propsResources ?? _propsResources,
  userId: userId ?? _userId,
);
  String? get expireTime => _expireTime;
  PropsResources? get propsResources => _propsResources;
  String? get userId => _userId;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['expireTime'] = _expireTime;
    if (_propsResources != null) {
      map['propsResources'] = _propsResources?.toJson();
    }
    map['userId'] = _userId;
    return map;
  }

}
