class User {

  final String? name;
  final String? email;
  final String? fullName;
  final String? token;
  int? appCompanyId;
  int? kassaId;
  
  User({this.email, this.fullName, this.name, this.token, this.appCompanyId, this.kassaId});

  static User? fromJson(Map<String, dynamic> json) {
    return json != null
    ? User (
      name: json['name'],
      email: json['mail'],
      token: json['api_token'],
      fullName: json['fullname'],
      appCompanyId:  json['app_company_id'] ,
      kassaId:  json['kassa_id'] ,
    )
    : null;
  }

  dynamic toJson() {
    return {
      "name": name,
      "mail": email,
      "api_token": token,
      "fullname": fullName,
      "app_company_id": appCompanyId,
      "kassa_id": kassaId
    };
  }
}
