diff --git a/REMAN/NKC.Data/DbModels/RemnantsModel.cs b/REMAN/NKC.Data/DbModels/RemnantsModel.cs new file mode 100644 index 0000000..f248cc1 --- /dev/null +++ b/REMAN/NKC.Data/DbModels/RemnantsModel.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace NKC.Data.DbModels +{ + // + // This is here so CodeMaid doesn't reorganize this document + // + //[Index(nameof(Installazione), nameof(Active), nameof(DiskStatus))] + [Table("Remnants")] + public partial class RemnantsModel + { + /// + /// Primary Key AUTO + /// + [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int RemnID { get; set; } + + /// + /// Ext ref for Material + /// + public int MatID { get; set; } + + /// + /// Location + /// + public string Location { get; set; } = ""; + /// + /// Qty available on wharehouse + /// + public int QtyAvail { get; set; } = 0; + + /// + /// DateTime last modification + /// + public DateTime DtMod { get; set; } = DateTime.Now.AddYears(10); + + /// + /// Remnant's Lenght + /// + public decimal LMm { get; set; } = 0; + + /// + /// Remnant's Width + /// + public decimal WMm { get; set; }=0; + + /// + /// Remnant's Thikness + /// + public decimal TMm { get; set; }=0; + + /// + /// Note (optional) + /// + public string Note { get; set; } = ""; + + /// + /// Navigation property to Material + /// + [ForeignKey("MatID")] + public virtual MaterialModel MaterialNav { get; set; } + + } +} diff --git a/REMAN/NKC.Data/NKCContext.cs b/REMAN/NKC.Data/NKCContext.cs index 51ae3a9..8cf236b 100644 --- a/REMAN/NKC.Data/NKCContext.cs +++ b/REMAN/NKC.Data/NKCContext.cs @@ -44,7 +44,8 @@ namespace NKC.Data #region Public Properties - public virtual DbSet DbSetMaterials { get; set; } = null!; + public virtual DbSet DbSetMaterials { get; set; } + public virtual DbSet DbSetRemnants { get; set; } #endregion Public Properties