Aggiunta DTO risposte Enroll

This commit is contained in:
Samuele Locatelli
2025-01-07 09:36:14 +01:00
parent e5b8de375f
commit 5896b0f270
2 changed files with 102 additions and 0 deletions
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EgwControlCenter.Core.DTO
{
/// <summary>
/// Classe risposta richiesta enroll applicativo
/// </summary>
public class EnrollRequestDTO
{
/// <summary>
/// ID univoco richiesta
/// </summary>
public int IdReq { get; set; }
/// <summary>
/// Passcode usato per autorizzare (un valore random NON DUPLICATO con quelli attivi al momento della richiesta)
/// </summary>
public int Passcode { get; set; } = 0;
/// <summary>
/// Payload richiesta, ovvero la serializzazione json di un Dict[string,string] delle info ricevute
/// </summary>
public string ReqPayload { get; set; } = "";
/// <summary>
/// DataOra richiesta enroll
/// </summary>
public DateTime DtReq { get; set; } = DateTime.Now;
/// <summary>
/// DataOra approvazione
/// </summary>
public DateTime? DtAppr { get; set; } = null;
/// <summary>
/// Username approvatore
/// </summary>
public string UserAppr { get; set; } = "";
/// <summary>
/// Licenza fornita in risposta alla richiesta
/// </summary>
public int IdxLic { get; set; } = 0;
/// <summary>
/// Indica Scaduta se non approvata e richiesta da oltre 15 minuti
/// </summary>
public bool IsScaduta { get; set; } = true;
/// <summary>
/// Dizionario attributi ricevuti nella richiesta
/// </summary>
public Dictionary<string, string> DictAttrib { get; set; } = new Dictionary<string, string>();
}
}
+43
View File
@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static EgwControlCenter.Core.CoreEnum;
namespace EgwControlCenter.Core.DTO
{
/// <summary>
/// Oggetto licenza da LiMan
/// </summary>
public class LicenzaDTO
{
public int IdxLic { get; set; } = 0;
public string CodApp { get; set; } = "";
public string CodInst { get; set; } = "";
public int NumLicenze { get; set; } = 0;
public string Descrizione { get; set; } = "";
public DateTime Scadenza { get; set; } = DateTime.Today.AddYears(-1);
public TipoLicenza Tipo { get; set; } = TipoLicenza.ND;
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;
public string ChiaveCalc { get; set; } = "";
public string PayloadCalc { get; set; } = "";
public bool IsActive { get; set; } = false;
public bool IsValid { get; set; } = false;
}
}