class KRUserInfo {
  final int id;
  final String email;
  final int refererId;
  final String referCode;
  final String avatar;
  final String areaCode;
  final String telephone;
 final int balance;

  KRUserInfo({
    required this.id,
    required this.email,
    this.refererId = 0,
    this.referCode = '',
    this.avatar = '',
    this.areaCode = '',
    this.telephone = '',
    this.balance = 0
  });

  factory KRUserInfo.fromJson(Map<String, dynamic> json) {
    return KRUserInfo(
      id: json['id'] ?? 0,
      email: json['email'] ?? '',
      refererId: json['referer_id'] ?? 0,
      referCode: json['refer_code'] ?? '',
      avatar: json['avatar'] ?? '',
      areaCode: json['area_code'] ?? '',
      telephone: json['telephone'] ?? '',
       balance: json['balance'] ?? 0,
    );
  }
}
