64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
using System;
|
|
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.DbModels
|
|
{
|
|
[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;
|
|
}
|
|
}
|
|
[NotMapped]
|
|
public decimal AvgTotEn01
|
|
{
|
|
get
|
|
{
|
|
var num = TotEn01;
|
|
var den = TotCount01;
|
|
if (den == 0)
|
|
{
|
|
den = 1;
|
|
}
|
|
decimal answ = num / den;
|
|
return answ;
|
|
}
|
|
}
|
|
}
|
|
} |