70 lines
2.0 KiB
C#
70 lines
2.0 KiB
C#
using EgwCoreLib.Lux.Data.DbModel.Sales;
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
namespace EgwCoreLib.Lux.Data.DbModel.Production
|
|
{
|
|
/// <summary>
|
|
/// Classe che definisce un assegnazione di produzione connettendo info relative a
|
|
/// - riga ordine
|
|
/// - macchine
|
|
/// - tags (item) assegnati)
|
|
/// </summary>
|
|
[Table("production_assign")]
|
|
public class ProductionAssignModel
|
|
{
|
|
[Key]
|
|
public int ProdAssignID { get; set; }
|
|
|
|
/// <summary>
|
|
/// Ordine cui fa riferimento
|
|
/// </summary>
|
|
public int OrderRowID { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Codice plant di assegnazione
|
|
/// </summary>
|
|
public string ProdPlantCod { get; set; } = "";
|
|
|
|
#if false
|
|
/// <summary>
|
|
/// Elenco assegnazioni con gestione serializzazione/deserializzazione inclusa
|
|
/// </summary>
|
|
public List<string> TagsList { get; set; } = new();
|
|
#endif
|
|
|
|
/// <summary>
|
|
/// Num parts complessivamente incluse
|
|
/// </summary>
|
|
[NotMapped]
|
|
public int NumParts => ItemsNav?.Count ?? 0;
|
|
|
|
/// <summary>
|
|
/// Tempo stimato complessivo
|
|
/// </summary>
|
|
[NotMapped]
|
|
public double TotalEstimTime => ItemsNav?.Sum(i => i.EstimTime) ?? 0;
|
|
|
|
/// <summary>
|
|
/// Navigazione OrderRow
|
|
/// </summary>
|
|
[ForeignKey("OrderRowID")]
|
|
public virtual OrderRowModel OrderRowNav { get; set; } = null!;
|
|
|
|
/// <summary>
|
|
/// Navigazione sugli items collegati
|
|
/// </summary>
|
|
public virtual ICollection<ProductionItemModel> ItemsNav { get; set; } = new HashSet<ProductionItemModel>();
|
|
|
|
}
|
|
}
|