Files
limanapp/LiMan.DB/DBModels/SubLicenzaModel.cs
T
2021-10-13 17:59:59 +02:00

43 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static LiMan.DB.Enum;
#nullable disable
namespace LiMan.DB.DBModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
[Table("SubLicenze")]
public partial class SubLicenzaModel
{
#region Public Properties
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int IdxSubLic { get; set; }
public int IdxLic { get; set; } = 0;
public string CodImpiego { get; set; }
public DateTime VetoUnlock { get; set; } = DateTime.Today.AddDays(10);
public TipoLicenza Tipo { get; set; } = TipoLicenza.UserKey;
public string Chiave { get; set; }
[NotMapped]
public bool Locked
{
get => (VetoUnlock.Subtract(DateTime.Today).TotalDays > 0);
}
[ForeignKey("IdxLic")]
public virtual LicenzaModel LicenzaNav { get; set; }
#endregion Public Properties
}
}