/// vipNo : null
/// nickname : "回乡_019921"
/// headimg : ""
/// userType : true
/// sex : ""
/// level : 1
/// addressId : "0"
/// remark : ""
/// phone : "15827991714"
/// createTime : "2021-06-21 15:40:38"
/// birth : ""
/// balance : null
/// money : "0.00"
/// points : "0"
/// isBind : null
/// memberRankVo : null
import 'package:huixiang/retrofit/data/member_rank.dart';

class UserInfo {
  UserInfo();

  String vipNo;
  String nickname;
  String headimg;
  bool userType;
  String sex;
  int level;
  String addressId;
  String remark;
  String phone;
  String createTime;
  String birth;
  dynamic balance;
  String money;
  String points;
  bool isBind;
  MemberRank memberRankVo;

  factory UserInfo.fromJson(Map<String, dynamic> json) =>
      UserInfo()
        ..vipNo = json['vipNo'] as String
        ..nickname = json['nickname'] as String
        ..headimg = json['headimg'] as String
        ..userType = json['userType'] as bool
        ..sex = json['sex'] as String
        ..level = json['level'] as int
        ..addressId = json['addressId'] as String
        ..remark = json['remark'] as String
        ..phone = json['phone'] as String
        ..createTime = json['createTime'] as String
        ..birth = json['birth'] as String
        ..balance = json['balance']
        ..money = json['money'] as String
        ..points = json['points'] as String
        ..isBind = json['isBind'] as bool
        ..memberRankVo = json['memberRankVo'] == null
            ? null
            : MemberRank.fromJson(json['memberRankVo'] as Map<String, dynamic>);

  Map<String, dynamic> toJson() => <String, dynamic>{
    'vipNo': this.vipNo,
    'nickname': this.nickname,
    'headimg': this.headimg,
    'userType': this.userType,
    'sex': this.sex,
    'level': this.level,
    'addressId': this.addressId,
    'remark': this.remark,
    'phone': this.phone,
    'createTime': this.createTime,
    'birth': this.birth,
    'balance': this.balance,
    'money': this.money,
    'points': this.points,
    'isBind': this.isBind,
    'memberRankVo': this.memberRankVo == null ? "" : this.memberRankVo.toJson(),
  };
}