feat: Support multi-material project parts
Each project part now references its own material, allowing a single project to use multiple material types. Removes ProjectStockBin entity since stock is now derived from material stock lengths. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,7 +11,8 @@ public class Material
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
public ICollection<SupplierStock> SupplierStocks { get; set; } = new List<SupplierStock>();
|
||||
public ICollection<Project> Projects { get; set; } = new List<Project>();
|
||||
public ICollection<MaterialStockLength> StockLengths { get; set; } = new List<MaterialStockLength>();
|
||||
public ICollection<ProjectPart> ProjectParts { get; set; } = new List<ProjectPart>();
|
||||
|
||||
public string DisplayName => $"{Shape} - {Size}";
|
||||
}
|
||||
|
||||
@@ -4,10 +4,12 @@ public class ProjectPart
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
public int MaterialId { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public decimal LengthInches { get; set; }
|
||||
public int Quantity { get; set; } = 1;
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
public Project Project { get; set; } = null!;
|
||||
public Material Material { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class ProjectStockBin
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProjectId { get; set; }
|
||||
public decimal LengthInches { get; set; }
|
||||
public int Quantity { get; set; } = -1;
|
||||
public int Priority { get; set; } = 25;
|
||||
public int SortOrder { get; set; }
|
||||
|
||||
public Project Project { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user