Aggiunta remnants su DB

This commit is contained in:
Samuele Locatelli
2021-11-18 18:34:59 +01:00
parent 4d95a45279
commit 17528bec75
2 changed files with 69 additions and 1 deletions
+67
View File
@@ -0,0 +1,67 @@
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("Remnants")]
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; } = "";
/// <summary>
/// Navigation property to Material
/// </summary>
[ForeignKey("MatID")]
public virtual MaterialModel MaterialNav { get; set; }
}
}
+2 -1
View File
@@ -44,7 +44,8 @@ namespace NKC.Data
#region Public Properties
public virtual DbSet<MaterialModel> DbSetMaterials { get; set; } = null!;
public virtual DbSet<MaterialModel> DbSetMaterials { get; set; }
public virtual DbSet<RemnantsModel> DbSetRemnants { get; set; }
#endregion Public Properties