78 lines
1.9 KiB
C#
78 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MagMan.Core.DTO
|
|
{
|
|
public class MaterialDTO
|
|
{
|
|
/// <summary>
|
|
/// Primary Key Materiale, 0 se proviente da EgtBeamWall
|
|
/// </summary>
|
|
public int MatId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Codice Materiale
|
|
/// </summary>
|
|
public string MatCode { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Descrizione materiale
|
|
/// </summary>
|
|
public string MatDesc { get; set; } = "";
|
|
|
|
/// <summary>
|
|
/// Lenght/Lunghezza in mm
|
|
/// </summary>
|
|
public decimal LMm { get; set; } = 0;
|
|
/// <summary>
|
|
/// Width/Larghezza in mm
|
|
/// </summary>
|
|
public decimal WMm { get; set; } = 0;
|
|
/// <summary>
|
|
/// Thikness/Spessore in mm
|
|
/// </summary>
|
|
public decimal HMm { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Varianti dimensionali disponibili
|
|
/// </summary>
|
|
public int SizeNum { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Quantità totale in giacenza
|
|
/// </summary>
|
|
public int QtyTot { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Codice materiale x QR/Datamatrix
|
|
/// </summary>
|
|
[NotMapped]
|
|
public string MatDtmx
|
|
{
|
|
get => $"MT{MatId:00000000}";
|
|
}
|
|
|
|
/// <summary>
|
|
/// Verifica che sia Beam, quando L == 0
|
|
/// </summary>
|
|
[NotMapped]
|
|
public bool IsBeam
|
|
{
|
|
get => (LMm == 0 && (HMm > 0 && WMm > 0));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Verifica che sia Wall, quando W/L == 0
|
|
/// </summary>
|
|
[NotMapped]
|
|
public bool IsWall
|
|
{
|
|
get => (HMm > 0 && (LMm == 0 && WMm == 0));
|
|
}
|
|
}
|
|
}
|