Files
NKC/REMAN/NKC.Data/DbModels/RemnantsModel.cs
T
Samuele Locatelli 20d89e4c79 Update pag remnants
2021-11-19 19:14:46 +01:00

81 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace NKC.Data.DbModels
{
// <Auto-Generated>
// This is here so CodeMaid doesn't reorganize this document
// </Auto-Generated>
//[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))]
[Table("RemnantsList")]
public partial class RemnantsModel
{
/// <summary>
/// Primary Key AUTO
/// </summary>
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int RemnID { get; set; }
/// <summary>
/// Ext ref for Material
/// </summary>
public int MatID { get; set; }
/// <summary>
/// Location
/// </summary>
public string Location { get; set; } = "";
/// <summary>
/// Qty available on wharehouse
/// </summary>
public int QtyAvail { get; set; } = 0;
/// <summary>
/// DateTime last modification
/// </summary>
public DateTime DtMod { get; set; } = DateTime.Now.AddYears(10);
/// <summary>
/// Remnant's Lenght
/// </summary>
public decimal LMm { get; set; } = 0;
/// <summary>
/// Remnant's Width
/// </summary>
public decimal WMm { get; set; }=0;
/// <summary>
/// Remnant's Thikness
/// </summary>
public decimal TMm { get; set; }=0;
/// <summary>
/// Note (optional)
/// </summary>
public string Note { get; set; } = "";
[NotMapped]
public decimal Area
{
get => LMm * WMm;
}
[NotMapped]
public string RemDtmx
{
get => $"MT{MaterialNav.MatExtCode:00000000}-{LMm*1000:00000000}-{WMm*1000:00000000}";
}
/// <summary>
/// Navigation property to Material
/// </summary>
[ForeignKey("MatID")]
public virtual MaterialModel MaterialNav { get; set; }
}
}