90 lines
2.4 KiB
C#
90 lines
2.4 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 MagMan.Data.Tenant.DbModels
|
|
{
|
|
// <Auto-Generated>
|
|
// This is here so CodeMaid doesn't reorganize this document
|
|
// </Auto-Generated>
|
|
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
|
|
[Table("RawItemList")]
|
|
public partial class RawItemModel
|
|
{
|
|
/// <summary>
|
|
/// Primary Key AUTO
|
|
/// </summary>
|
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
public int RawItemId { get; set; }
|
|
|
|
/// <summary>
|
|
/// Ext ref for Material
|
|
/// </summary>
|
|
public int MatId { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Qty available on wharehouse
|
|
/// </summary>
|
|
public int QtyAvail { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Bool for logical delete (cloud and on PC...)
|
|
/// </summary>
|
|
public bool IsDeleted { get; set; } = false;
|
|
|
|
/// <summary>
|
|
/// Check if is a Remnant
|
|
/// </summary>
|
|
public bool IsRemn { get; set; } = true;
|
|
|
|
/// <summary>
|
|
/// Location
|
|
/// </summary>
|
|
public string Location { get; set; } = "";
|
|
/// <summary>
|
|
/// Item's Lenght
|
|
/// </summary>
|
|
public decimal LMm { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Item's Width
|
|
/// </summary>
|
|
public decimal WMm { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Item's Height (Thikness/Spessore) in mm
|
|
/// </summary>
|
|
public decimal HMm { get; set; } = 0;
|
|
|
|
/// <summary>
|
|
/// Note (optional)
|
|
/// </summary>
|
|
public string Note { get; set; } = "";
|
|
|
|
[NotMapped]
|
|
public string ItemDtmx
|
|
{
|
|
get
|
|
{
|
|
string answ = $"MT99999999W{WMm * 10:000000}H{HMm * 10:000000}L{LMm * 10:000000}";
|
|
if (MaterialNav != null)
|
|
{
|
|
answ = $"MT{MaterialNav.MatId:00000000}W{WMm * 10:000000}H{HMm * 10:000000}L{LMm * 10:000000}";
|
|
}
|
|
return answ;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Navigation property to Material
|
|
/// </summary>
|
|
[ForeignKey("MatId")]
|
|
public virtual MaterialModel MaterialNav { get; set; } = null!;
|
|
|
|
}
|
|
}
|