Files
limanapp/LiMan.DB/DTO/ApplicativoDTO.cs

44 lines
1.2 KiB
C#

using Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Core.Enum;
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace LiMan.DB.DTO
{
public class ApplicativoDTO
{
public int IdxLic { get; set; } = 0;
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
public string Descrizione { get; set; } = "";
public TipoLicenza Tipo { get; set; } = TipoLicenza.ND;
public DateTime Scadenza { get; set; } = DateTime.Today.AddYears(-1);
public int NumLicenze { get; set; } = 0;
public int NumLicenzeAttive { get; set; } = 0;
public string Chiave { get; set; } = "";
public DateTime DataEnigma { get; set; } = DateTime.Today.AddYears(-1);
public string Enigma { get; set; } = "";
public string Payload { get; set; } = "";
public bool Locked { get; set; } = false;
[NotMapped]
public bool IsActive
{
get => (Scadenza.Subtract(DateTime.Today).TotalDays > 0);
}
}
}