Files
2021-10-14 15:37:21 +02:00

49 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
namespace LiMan.GLS.DatabaseModels
{
public partial class LicenzeAttive
{
#region Public Properties
public string Applicativo { get; set; }
public virtual AnagApplicazioni ApplicativoNavigation { get; set; }
public string Descrizione { get; set; } = "";
public int IdxLic { get; set; }
public string Installazione { get; set; }
public virtual AnagInstallazioni InstallazioneNavigation { get; set; }
[NotMapped]
public bool IsScaduto
{
get => DateTime.Today.Subtract(Scadenza).TotalDays > 0;
}
[NotMapped]
public bool IsValid
{
get => Licenza.Equals(LicenzaCalc);
}
public string Licenza { get; set; }
[NotMapped]
public string LicenzaCalc
{
get
{
return Core.licenseManGLS.getAuthKey(Installazione, Applicativo, NumLicenze, Scadenza);
}
}
public bool Locked { get; set; } = false;
public int NumLicenze { get; set; } = 0;
public DateTime Scadenza { get; set; } = DateTime.Today.AddYears(-1);
#endregion Public Properties
}
}