71 lines
2.0 KiB
C#
71 lines
2.0 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;
|
|
|
|
namespace MP.MONO.Data.DbModels
|
|
{
|
|
/// <summary>
|
|
/// Tabella Dati in formato Statistiche Aggregate
|
|
/// </summary>
|
|
[Table("DataStAg")]
|
|
public class DataStAgModel
|
|
{
|
|
/// <summary>
|
|
/// UID
|
|
/// </summary>
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int DataStAgId { get; set; }
|
|
|
|
/// <summary>
|
|
/// DataOra riferimento
|
|
/// </summary>
|
|
public DateTime DtEvent { get; set; } = DateTime.Now;
|
|
|
|
/// <summary>
|
|
/// Tipologia di Flusso dati (per poter salvare "ultimo di ogni flusso" come "current status")
|
|
/// </summary>
|
|
[MaxLength(250)]
|
|
public string FluxType { get; set; } = "ND";
|
|
|
|
/// <summary>
|
|
/// Macchina cui è riferito il valore
|
|
/// </summary>
|
|
public int MachineId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Numero record di riferimento
|
|
/// </summary>
|
|
public double NumRec { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Valore medio (avg) formato numerico (0 se non numerico)
|
|
/// </summary>
|
|
public double ValNumAvg { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Valore minimo formato numerico (0 se non numerico)
|
|
/// </summary>
|
|
public double ValNumMin { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Valore massimo formato numerico (0 se non numerico)
|
|
/// </summary>
|
|
public double ValNumMax { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Valore (medio/mediano) formato stringa
|
|
/// </summary>
|
|
[MaxLength(250)]
|
|
public string ValStr { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Navigazione oggetto MAchine
|
|
/// </summary>
|
|
[ForeignKey("MachineId")]
|
|
public virtual MachineModel MachineNav { get; set; } = null!;
|
|
}
|
|
} |