class AuthModel {
  final String token;
  final StaffModel model;
  final String? idTokenGoogle;
  final String? accessTokenGoogle;

  AuthModel({
    required this.token,
    required this.model,
    this.idTokenGoogle,
    this.accessTokenGoogle,
  });
}

class StaffModel {
  String? staffId;
  String? nip;
  String? name;
  String? email;
  String? phoneNumber;
  String? token;
  String? idGoogleSignIn;
  String? companyId;
  String? companyName;

  StaffModel(
      {this.staffId,
      this.nip,
      this.name,
      this.email,
      this.phoneNumber,
      this.token,
      this.idGoogleSignIn,
      this.companyId,
      this.companyName});

  StaffModel.fromJson(Map<String, dynamic> json) {
    staffId = json['staff_id'];
    nip = json['nip'];
    name = json['name'];
    email = json['email'];
    phoneNumber = json['phone_number'];
    token = json['token'];
    idGoogleSignIn = json['id_google_sign_in'];
    companyId = json['company_id'];
    companyName = json['company_name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['staff_id'] = this.staffId;
    data['nip'] = this.nip;
    data['name'] = this.name;
    data['email'] = this.email;
    data['phone_number'] = this.phoneNumber;
    data['token'] = this.token;
    data['id_google_sign_in'] = this.idGoogleSignIn;
    data['company_id'] = this.companyId;
    data['company_name'] = this.companyName;
    return data;
  }
}
