using System.ComponentModel.DataAnnotations.Schema;
namespace MagMan.Core.DTO
{
//
// This is here so CodeMaid doesn't reorganize this document
//
public class MaterialDTO
{
///
/// Primary Key Materiale (DB) / CLOUD
///
public int MatCloudId { get; set; } = 0;
///
/// Primary Key Materiale (DB) / istanza locale
///
public int MatLocalId { get; set; } = 0;
///
/// Codice Materiale
///
public string MatCode { get; set; } = "";
///
/// Descrizione materiale
///
public string MatDesc { get; set; } = "";
///
/// Thikness/Spessore in mm
///
public decimal HMm { get; set; } = 0;
///
/// Lenght/Lunghezza in mm
///
public decimal LMm { get; set; } = 0;
///
/// Width/Larghezza in mm
///
public decimal WMm { get; set; } = 0;
///
/// Varianti dimensionali disponibili
///
public int SizeNum { get; set; } = 0;
///
/// Quantità totale in giacenza, come lunghezza (m) se barre o area (m2) se pareti
///
public decimal QtyTot { get; set; } = 0;
public string UM
{
get => IsBeam ? "m" : "m2";
}
///
/// Codice materiale x QR/Datamatrix
///
public string MatDtmx { get; set; } = "";
///
/// Verifica che sia Beam, quando L == 0
///
public bool IsBeam { get; set; } = false;
///
/// Verifica che sia Wall, quando W/L == 0
///
public bool IsWall { get; set; } = false;
///
/// Elenco item e giancenze
///
public List? ItemList { get; set; } = new List();
}
}