Modifiche modelli x creazione migrations

This commit is contained in:
Samuele Locatelli
2024-01-18 13:07:08 +01:00
parent 07b7ad6ee3
commit 70078533d2
3 changed files with 23 additions and 4 deletions
+10
View File
@@ -80,6 +80,16 @@ namespace EgtBEAMWALL.DataLayer
/// </summary>
public DbSet<StatusMapModel> StatusMapList { get; set; }
/// <summary>
/// Wharehouse materials management
/// </summary>
public DbSet<MaterialModel> MaterialsList { get; set; }
/// <summary>
/// Wharehouse items management
/// </summary>
public DbSet<RawItemModel> RawItemList { get; set; }
#endregion Public Properties
#region Public Methods
@@ -14,6 +14,14 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
[Table("Materials")]
public partial class MaterialModel
{
/// <summary>
/// Init classe
/// </summary>
public MaterialModel()
{
RawItemList = new HashSet<RawItemModel>();
}
/// <summary>
/// Primary Key AUTO
/// </summary>
@@ -49,9 +57,10 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
public decimal HMm { get; set; } = 0;
/// <summary>
/// ItemId dell'ultimo artico,o usato per il materiale
/// ID dell'ultimo articolo (variante) usato per il materiale
/// </summary>
public int ItemIdLast { get; set; } = 0;
public int RawItemIdLast { get; set; } = 0;
#if false
/// <summary>
/// Lenght/Lunghezza in inch
@@ -88,6 +97,6 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
}
#endif
public virtual ICollection<RawItemModel> ItemList { get; set; }
public virtual ICollection<RawItemModel> RawItemList { get; set; }
}
}
@@ -19,7 +19,7 @@ namespace EgtBEAMWALL.DataLayer.DatabaseModels
/// Primary Key AUTO
/// </summary>
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int ItemId { get; set; }
public int RawItemId { get; set; }
/// <summary>
/// ForeignKey Materiale