Files
StandManager/StandManager.Domain/Entita/Utente.cs
2025-12-19 10:38:51 +01:00

35 lines
947 B
C#

using StandManager.Domain.Entita.Base;
using System.ComponentModel.DataAnnotations.Schema;
namespace StandManager.Domain.Entita;
public class Utente : EntitaBase
{
public Utente()
{
DataCreazione = DateTime.Now;
Eliminato = false;
Username = string.Empty;
}
public string Username { get; set; }
public string Email { get; set; }
public string Password { get; set; }
public string Nome { get; set; }
public string Cognome { get; set; }
public string? CodiceAgente { get; set; }
[ForeignKey(nameof(Ruolo))]
public Guid? RuoloId { get; set; }
public Ruolo Ruolo { get; set; }
[ForeignKey(nameof(Capoarea))]
public Guid? CapoareaId { get; set; }
public Utente Capoarea { get; set; }
public bool IsCapoarea { get; set; }
public string Info => $"{Nome} {Cognome}";
public override string ToString()
{
return $"{Nome} {Cognome}";
}
}