
import 'package:twong/models/index.dart';

extension UserExt on UserInfo {
  void update(User user) {
    uid = user.uid;
    level = user.level;
    real_name = user.real_name;
    birthday = user.birthday;
    card_id = user.card_id;
    partner_id = user.partner_id;
    group_id = user.group_id;
    nickname = user.nickname;
    avatar = user.avatar;
    phone = user.phone;
    now_money = user.now_money;
    brokerage_price = user.brokerage_price;
    integral = user.integral;
    sign_num = user.sign_num;
    level = user.level;
    spread_uid = user.spread_uid;
    spread_time = user.spread_time;
    user_type = user.user_type;
    is_promoter = user.is_promoter;
    pay_count = user.pay_count;
    spread_count = user.spread_count;
    addres = user.addres;
    adminid = user.adminid ? 1 : 0;
    login_type = user.login_type;
    vip_level = user.vip_level;
    vip_status = user.vip_status;
    vip_card_level = user.vip_card_level;
    vip_gift = user.vip_gift;
    vip_time = user.vip_time;
    vip_card_id = user.vip_card_id;
    broken_commission = user.broken_commission;
    commissionCount = user.commissionCount;
  }
}