Files
lux/EgwCoreLib.Lux.Data/DbModel/OfferRowModel.cs
T
Samuele Locatelli f31e90b18b Update gestione environment
- in API x cercare img x env
- update metodo x BEAM/WINDOW...
2025-08-08 10:31:07 +02:00

137 lines
3.9 KiB
C#

using Microsoft.EntityFrameworkCore;
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;
namespace EgwCoreLib.Lux.Data.DbModel
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
[Table("OfferRowList")]
public class OfferRowModel
{
/// <summary>
/// ID del record
/// </summary>
[Key]
public int OfferRowID { get; set; }
/// <summary>
/// Riferimento offerta
/// </summary>
public int OfferID { get; set; }
/// <summary>
/// Riga Offerta (per ordinamento)
/// </summary>
public int RowNum { get; set; } = 0;
/// <summary>
/// Campo salvato dell'Environment
/// </summary>
public string Environment { get; set; } = "WINDOW";
/// <summary>
/// Campo salvato dell'UID da codice DataMatrix calcolato
/// </summary>
public string OfferRowUID { get; set; } = "OFF00001230AZ";
/// <summary>
/// Codice calcolato offerta ANNO.ID_RIGA_OFFERTA (0...Z come Dtx)
/// </summary>
[NotMapped]
public string OfferRowDtx
{
get => $"OFF{Inserted.Year:yy}{OfferRowID:000000000}";
}
/// <summary>
/// ID dell'articolo di vendita offerto
/// </summary>
public int SellingItemID { get; set; }
/// <summary>
/// Costo (standard / senza listini)
/// </summary>
public double Cost { get; set; } = 0;
/// <summary>
/// Margine percentuale standard
/// </summary>
public double Qty { get; set; } = 1;
[NotMapped]
public double TotalCost
{
get => Qty * Cost;
}
/// <summary>
/// Valore serializzato della composizione articolo (in formato JWD x finestra)
/// </summary>
public string SerStruct { get; set; } = "";
/// <summary>
/// Json contenente la serializzazione delle fasi previste per la stima dei tempi e costi in formato SerializedPhasePreview; potrebbe contenere anche altre info accessorie x definire dati logistico/gestionali
/// </summary>
public string ItemSPP { get; set; } = "";
/// <summary>
/// BOM serializzata per la produzione dell'item
/// </summary>
public string ItemBOM { get; set; } = "";
/// <summary>
/// Validazione dati BOM (Inteso come gruppi tutti trovati/esistenti)
/// </summary>
public bool BomOk { get; set; } = false;
/// <summary>
/// Validazione livello item per Costo e range dimensione
/// </summary>
public bool ItemOk { get; set; } = false;
/// <summary>
/// Note libere
/// </summary>
public string Note { get; set; } = "";
#if false
/// <summary>
/// Stack degli ultimi item serializzati per Uno/Redo actions
/// </summary>
[NotMapped]
public List<string> UndoRedoSerStruct { get; set; } = new List<string>();
#endif
/// <summary>
/// DataOra inserimento
/// </summary>
public DateTime Inserted { get; set; } = DateTime.Now;
/// <summary>
/// DataOra ultima modifica
/// </summary>
public DateTime Modified { get; set; } = DateTime.Now;
/// <summary>
/// Navigazione Offer
/// </summary>
[ForeignKey("OfferID")]
public virtual OfferModel OfferNav { get; set; } = null!;
/// <summary>
/// Navigazione Item
/// </summary>
[ForeignKey("SellingItemID")]
public virtual SellingItemModel SellingItemNav { get; set; } = null!;
}
}