/// token : "6209c60befba0f34c3ade079409337713ddab9c5"
/// user_id : "55"
/// username : "1328603811x"
/// perms : ["app_zhiyingshenghuo_access"]
/// register_invite_code_enable : "0"

class LoginUser {
  String token;
  String userId;
  String username;
  List<String> perms;
  String registerInviteCodeEnable;

  LoginUser(
      {this.token,
        this.userId,
        this.username,
        this.perms,
        this.registerInviteCodeEnable});

  LoginUser.fromJson(Map<String, dynamic> json) {
    token = json['token'];
    userId = json['user_id'];
    username = json['username'];
    perms = json['perms'].cast<String>();
    registerInviteCodeEnable = json['register_invite_code_enable'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['token'] = this.token;
    data['user_id'] = this.userId;
    data['username'] = this.username;
    data['perms'] = this.perms;
    data['register_invite_code_enable'] = this.registerInviteCodeEnable;
    return data;
  }

  @override
  String toString() {
    return 'LoginUser{token: $token, userId: $userId, username: $username, perms: $perms, registerInviteCodeEnable: $registerInviteCodeEnable}';
  }
}
