120 lines
3.1 KiB
C#
120 lines
3.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace EgtBEAMWALL.DataLayer.DatabaseModels
|
|
{
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
[Table("MaterialsList")]
|
|
public partial class MaterialModel
|
|
{
|
|
/// <summary>
|
|
/// Init classe
|
|
/// </summary>
|
|
public MaterialModel()
|
|
{
|
|
RawItemList = new HashSet<RawItemModel>();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Primary Key AUTO
|
|
/// </summary>
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int MatId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Codice materiale (Identificativo DB esterno del magazzino in sync)
|
|
/// </summary>
|
|
public int MatCloudId { 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>
|
|
/// Height (Thikness/Spessore) in mm
|
|
/// </summary>
|
|
public decimal HMm { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// ID dell'ultimo articolo (variante) usato per il materiale
|
|
/// </summary>
|
|
public int RawItemIdLast { get; set; } = 0;
|
|
|
|
#if false
|
|
/// <summary>
|
|
/// Lenght/Lunghezza in inch
|
|
/// </summary>
|
|
[NotMapped]
|
|
public decimal LIn
|
|
{
|
|
get => Math.Round(LMm / (decimal)25.4, 3);
|
|
}
|
|
/// <summary>
|
|
/// Width/Larghezza in inch
|
|
/// </summary>
|
|
[NotMapped]
|
|
public decimal WIn
|
|
{
|
|
get => Math.Round(WMm / (decimal)25.4, 3);
|
|
}
|
|
/// <summary>
|
|
/// Height/Altezza (Thikness/Spessore) in inch
|
|
/// </summary>
|
|
[NotMapped]
|
|
public decimal HIn
|
|
{
|
|
get => Math.Round(HMm / (decimal)25.4, 3);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Codice materiale x QR/Datamatrix
|
|
/// </summary>
|
|
[NotMapped]
|
|
public string MatDtmx
|
|
{
|
|
get => $"MT{MatExtId:00000000}";
|
|
}
|
|
#endif
|
|
/// <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 => (LMm == 0 && WMm == 0);
|
|
}
|
|
|
|
public virtual ICollection<RawItemModel> RawItemList { get; set; }
|
|
}
|
|
}
|