77 lines
2.3 KiB
C#
77 lines
2.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
namespace LiMan.DB.DTO
|
|
{
|
|
/// <summary>
|
|
/// DTO relativo alle info RAGGRUPPATE x applicativo
|
|
/// </summary>
|
|
public class AppStatusDTO
|
|
{
|
|
|
|
/// <summary>
|
|
/// CodApp Richiesta
|
|
/// </summary>
|
|
public string CodApp { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Conteggio del numero totale installazioni
|
|
/// </summary>
|
|
|
|
public int NumInst { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Conteggio del numero totale degli impieghi attivi (es conteggio IOB)
|
|
/// </summary>
|
|
|
|
public int NumImp { get; set; } = 1;
|
|
|
|
/// <summary>
|
|
/// Versione Release corrente
|
|
/// </summary>
|
|
public string VersNumCurrent { get; set; } = "0.0.0.0";
|
|
|
|
/// <summary>
|
|
/// Dizionario Versioni Installate
|
|
/// </summary>
|
|
public Dictionary<string, int> DictVersNumInst { get; set; } = new Dictionary<string, int>();
|
|
|
|
/// <summary>
|
|
/// Dizionario Stato Update, dove la chiave è UpToDateStatus come
|
|
/// 4 = corrente, 4 blocchi uguali (0.0.0.0)
|
|
/// 3 = 3 uguali, cambia 4 blocco (0.0.0.x)
|
|
/// 2 = 2 uguali, cambia 3 blocco (0.0.x.x)
|
|
/// 1 = 1 uguali, cambia 2 blocco (0.x.x.x)
|
|
/// 0 = 0 uguali, cambia 1 blocco (x.x.x.x)
|
|
/// </summary>
|
|
public Dictionary<int, int> DictUpdate { get; set; } = new Dictionary<int, int>();
|
|
|
|
/// <summary>
|
|
/// Dettaglio delle versioni installate con tutte le info
|
|
/// </summary>
|
|
public List<AppRelStatusDTO> DetailInstalled { get; set; } = new List<AppRelStatusDTO>();
|
|
|
|
/// <summary>
|
|
/// Score dello stato di aggiornamento complessivo
|
|
/// </summary>
|
|
public double UpdateScore
|
|
{
|
|
get => DictUpdate != null ? (double)(DictUpdate.Sum(x => x.Key * x.Value)) / (4 * DictUpdate.Sum(x => x.Value)) : 0;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Data Ora ultimo controllo
|
|
/// </summary>
|
|
public DateTime DtCheck { get; set; } = DateTime.Now;
|
|
|
|
}
|
|
}
|