49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MagMan.Data.Tenant.DbModels
|
|
{
|
|
[Table("DayStat")]
|
|
public class DayStatModel
|
|
{
|
|
[Key, Column("DayId"), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int DayId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Id macchina (diMagMan)
|
|
/// </summary>
|
|
public int MachineID { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Data di riferimento
|
|
/// </summary>
|
|
public DateTime DtRif { get; set; } = DateTime.MinValue;
|
|
|
|
/// <summary>
|
|
/// Ope apertura disponibili
|
|
/// </summary>
|
|
public double OreDis { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Ore lavorate effettive
|
|
/// </summary>
|
|
public double OreLav { get; set; } = 0;
|
|
|
|
[NotMapped]
|
|
public double OEE
|
|
{
|
|
get
|
|
{
|
|
double denom = OreDis > 0 ? OreDis : 1;
|
|
return OreLav / denom;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|