using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace GPW.CORE.Data.DbModels { // // This is here so CodeMaid doesn't reorganize this document // [Table("Dipendenti")] public partial class DipendentiModel { public DipendentiModel() { RegAttivitaNav = new HashSet(); RilievoTempNav = new HashSet(); TimbratureNav = new HashSet(); } [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] public int IdxDipendente { get; set; } public string? Matricola { get; set; } public string Cf { get; set; } = null!; public string? Cognome { get; set; } public string? Nome { get; set; } public DateTime? DataNascita { get; set; } public string? LuogoNascita { get; set; } public string? ProvNascita { get; set; } public string? NazNascita { get; set; } public string CodHw { get; set; } = null!; public string CodOrario { get; set; } = ""; public bool? MailLastOp { get; set; } public bool? MailDay { get; set; } public bool? MailWeek { get; set; } public bool? MailMonth { get; set; } public string Email { get; set; } = null!; public string AuthKey { get; set; } = null!; /// /// numero di impieghi della authKey /// public int? NumAuth { get; set; } public string? WolMac { get; set; } public string Dominio { get; set; } = null!; public string Utente { get; set; } = null!; /// /// nome/codice dipendente per sistema esterno da importare /// public string CodDipendenteExt { get; set; } = null!; public string? Gruppo { get; set; } public DateTime? DataAssunzione { get; set; } public DateTime? DataCessazione { get; set; } public bool? Attivo { get; set; } public string Sigla { get; set; } = ""; [NotMapped] public string Abbrev { get { return $"{Nome.Substring(0, 1)}.{Cognome}"; } } public int idxResp { get; set; } = 0; public virtual ICollection RegAttivitaNav { get; set; } public virtual ICollection RilievoTempNav { get; set; } public virtual ICollection TimbratureNav { get; set; } [ForeignKey("CodOrario")] public virtual AnagOrariModel? OrarioNav { get; set; } public override bool Equals(object? obj) { if (!(obj is DipendentiModel item)) return false; if (obj == null) return false; if (IdxDipendente != item.IdxDipendente) return false; if (AuthKey != item.AuthKey) return false; if (Cf != item.Cf) return false; if (Cognome != item.Cognome) return false; if (DataAssunzione != item.DataAssunzione) return false; if (DataCessazione!= item.DataCessazione) return false; if (DataNascita!= item.DataNascita) return false; if (Email != item.Email) return false; if (Nome != item.Nome) return false; return true; } public override int GetHashCode() { return base.GetHashCode(); } } }