Files
mapo-core/MP.Data/DatabaseModels/OdlEnergyModel.cs
T
Samuele Locatelli 43aae08d1e STATS:
- Update visualizzazione ODL ed Energy
2025-02-18 11:57:06 +01:00

50 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#nullable disable
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
namespace MP.Data.DatabaseModels
{
[Table("ODL_Energy")]
public partial class OdlEnergyModel
{
[Key]
public int IdxOdl { get; set; }
public string KeyRichiesta { get; set; }
public string CodArticolo { get; set; } = "";
public string DescArticolo { get; set; } = "";
public decimal TCAssegnato { get; set; }
public string IdxMacchina { get; set; }
public DateTime DataInizio { get; set; } = DateTime.MinValue;
public DateTime? DataFine { get; set; }
public decimal TotCount { get; set; } = 0;
public decimal TotGas { get; set; } = 0;
public decimal TotWatt { get; set; } = 0;
public decimal TotCount01 { get; set; } = 0;
public decimal TotCount02 { get; set; } = 0;
public decimal TotCount03 { get; set; } = 0;
public decimal TotEn01 { get; set; } = 0;
public decimal TotEn02 { get; set; } = 0;
public decimal TotEn03 { get; set; } = 0;
[NotMapped]
public decimal AvgWatt
{
get
{
var num = TotWatt;
var den = TotCount;
if (den == 0)
{
den = 1;
}
decimal answ = num / den;
return answ;
}
}
}
}