60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
using Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using static Core.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; }
|
|
|
|
/// <summary>
|
|
/// IDX licenza master
|
|
/// </summary>
|
|
public int IdxLic { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Codice univoco della sub licenza generata
|
|
/// </summary>
|
|
public string CodImpiego { get; set; }
|
|
|
|
/// <summary>
|
|
/// Data scadenza VETO x cambio destinazione
|
|
/// </summary>
|
|
public DateTime VetoUnlock { get; set; } = DateTime.Today.AddMonths(2);
|
|
|
|
/// <summary>
|
|
/// Tipologia di licenza gestita
|
|
/// </summary>
|
|
public TipoLicenza Tipo { get; set; } = TipoLicenza.UserKey;
|
|
|
|
/// <summary>
|
|
/// Chiave opzionale collegata all'utente
|
|
/// </summary>
|
|
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
|
|
}
|
|
} |