class Personel {
  String? id;
  String? firstName;
  String? lastName;
  String? email;
  String? password;
  String? ceptelefon;
  String? image;
  String? onay;
  String? userdataAdres;
  String? userdataTcKimlik;
  String? userdataIseGirisTarihi;
  String? userdataAskerlikDurumu;
  String? userkalanizin;
  String? userkullanilanizin;
  String? unvanId;
  String? toplamhakkettigiizinsayisi;

  Personel(
      {this.id,
      this.firstName,
      this.lastName,
      this.email,
      this.password,
      this.ceptelefon,
      this.image,
      this.onay,
      this.userdataAdres,
      this.userdataTcKimlik,
      this.userdataIseGirisTarihi,
      this.userdataAskerlikDurumu,
      this.userkalanizin,
      this.userkullanilanizin,
      this.unvanId,
      this.toplamhakkettigiizinsayisi});

  factory Personel.fromJson(Map<String, dynamic> json) {
    return Personel(
      id: json["id"] ?? "0",
      firstName: json["first_name"] ?? "girilmemis",
      lastName: json["last_name"] ?? "girilmemis",
      email: json['email'] ?? "girilmemis",
      password: json['password'] ?? "0",
      ceptelefon: json['ceptelefon'] ?? "girilmemis",
      image: json['image'] ?? "buresimyok.jpg",
      onay: json['onay'] ?? "0",
      userdataAdres: json['userdata_adres'] ?? "girilmemis",
      userdataTcKimlik: json['userdata_tc_kimlik'] ?? "0",
      userdataIseGirisTarihi: json['userdata_ise_giris_tarihi'] ?? "0",
      userdataAskerlikDurumu: json['userdata_askerlik_durumu'] ?? "1",
      userkalanizin: json['userkalanizin'] ?? "0",
      userkullanilanizin: json['userkullanilanizin'] ?? "0",
      unvanId: json['unvan_id'] ??
          "0", //varsayılan olarak 15 gelsin personel unvan id
      toplamhakkettigiizinsayisi: json['toplamhakkettigiizinsayisi'] ?? "0",
    );
  }
}
