90 lines
2.5 KiB
C#
90 lines
2.5 KiB
C#
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
namespace EgwCoreLib.Lux.Data.DbModel.Production
|
|
{
|
|
/// <summary>
|
|
/// Batch di produzione (CdP = Commessa di Produzione)
|
|
/// - raggruppamento di PARTS
|
|
/// - le parts possono arrivare da 1/+ POR
|
|
/// - il set procede insieme ove necessario
|
|
/// - in relazione 1...N con gli ODL = ItemStep (perché ogni ODL è una singola fase e ho sempre 1/+ fasi su cui esploderlo)
|
|
/// </summary>
|
|
[Table("production_batch")]
|
|
public class ProductionBatchModel
|
|
{
|
|
/// <summary>
|
|
/// ID del Batch di produzione
|
|
/// </summary>
|
|
[Key]
|
|
public int ProdBatchID { get; set; }
|
|
|
|
/// <summary>
|
|
/// Codice calcolato (13 char)
|
|
/// - tipo (BC.)
|
|
/// - anno (yyyy)
|
|
/// - id annuale (000000x8)
|
|
/// es: "BC.20250012AF
|
|
/// </summary>
|
|
public string BatchTag { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Descrizione
|
|
/// </summary>
|
|
public string Description { get; set; } = "";
|
|
/// <summary>
|
|
/// DataOra consegna dell'intera commessa
|
|
/// </summary>
|
|
public DateTime DueDate { get; set; } = DateTime.Today.AddMonths(6);
|
|
|
|
/// <summary>
|
|
/// DataOra inizio effettivo
|
|
/// </summary>
|
|
public DateTime? DateStart { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// DataOra fine
|
|
/// </summary>
|
|
public DateTime? DateEnd { get; set; } = null;
|
|
|
|
#if false
|
|
/// <summary>
|
|
/// DataOra pianificata per inizio (prima fase)
|
|
/// </summary>
|
|
public DateTime? PlannedStart { get; set; } = null;
|
|
|
|
/// <summary>
|
|
/// Tempo stimato complessivo per realizzazione
|
|
/// </summary>
|
|
public decimal EstimLeadTime { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Tempo stimato sola lavorazione
|
|
/// </summary>
|
|
public decimal EstimWorkTime { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Indica che il batch è stato pianificato
|
|
/// </summary>
|
|
[NotMapped]
|
|
public bool IsPlanned
|
|
{
|
|
get => PlannedStart != null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Indica che sia passata la data attesa di completamento
|
|
/// </summary>
|
|
[NotMapped]
|
|
public bool IsExpired
|
|
{
|
|
get => DueDate <= DateTime.Today;
|
|
}
|
|
#endif
|
|
|
|
}
|
|
}
|