72 lines
2.2 KiB
C#
72 lines
2.2 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.DbModels
|
|
{
|
|
[Table("v_ODL_exp")]
|
|
public partial class ODLExpModel
|
|
{
|
|
#region Public Properties
|
|
|
|
[Key]
|
|
public int IdxOdl { get; set; }
|
|
public string CodArticolo { get; set; } = "";
|
|
public string IdxMacchina { get; set; }
|
|
public int NumPezzi { get; set; }
|
|
public decimal Tcassegnato { get; set; }
|
|
public decimal TCRichAttr { get; set; }
|
|
public DateTime? DataInizio { get; set; }
|
|
public DateTime? DataFine { get; set; }
|
|
[MaxLength(2500)]
|
|
public string Note { get; set; } = "";
|
|
public string KeyRichiesta { get; set; }
|
|
public int PzPallet { get; set; } = 1;
|
|
public string CodCli { get; set; } = "";
|
|
|
|
[NotMapped]
|
|
public string DurataMinuti
|
|
{
|
|
get
|
|
{
|
|
string answ = "";
|
|
DateTime end = DataFine != null ? (DateTime)DataFine : DateTime.Now;
|
|
var tsDurata = (end).Subtract((DateTime)DataInizio);
|
|
if (tsDurata.TotalDays < 1)
|
|
{
|
|
answ = $"{tsDurata.Hours:00}h {tsDurata.Minutes:00}'";
|
|
}
|
|
else
|
|
{
|
|
answ = $"{tsDurata.Days}gg {tsDurata.Hours:00}h";
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Navigazione oggetto Machine
|
|
/// </summary>
|
|
[ForeignKey("IdxMacchina")]
|
|
public virtual MacchineModel MachineNav { get; set; } = null!;
|
|
/// <summary>
|
|
/// Navigazione oggetto Articolo
|
|
/// </summary>
|
|
[ForeignKey("CodArticolo")]
|
|
public virtual AnagArticoliModel ArticoloNav { get; set; } = null!;
|
|
|
|
public string DescArticolo { get; set; } = "";
|
|
public string CodMacchina { get; set; } = "";
|
|
public string Nome { get; set; } = "";
|
|
|
|
public string OperSetup { get; set; }
|
|
|
|
#endregion Public Properties
|
|
}
|
|
} |