Files

107 lines
3.7 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace GPW.CORE.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("Dipendenti")]
public partial class DipendentiModel
{
public DipendentiModel()
{
RegAttivitaNav = new HashSet<RegAttivitaModel>();
RilievoTempNav = new HashSet<RilievoTempModel>();
TimbratureNav = new HashSet<TimbratureModel>();
}
[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!;
/// <summary>
/// numero di impieghi della authKey
/// </summary>
public int? NumAuth { get; set; }
public string? WolMac { get; set; }
public string Dominio { get; set; } = null!;
public string Utente { get; set; } = null!;
/// <summary>
/// nome/codice dipendente per sistema esterno da importare
/// </summary>
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<RegAttivitaModel> RegAttivitaNav { get; set; }
public virtual ICollection<RilievoTempModel> RilievoTempNav { get; set; }
public virtual ICollection<TimbratureModel> 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();
}
}
}