feat: Add CutList.Web Blazor Server application
Add a new web-based frontend for cut list optimization using: - Blazor Server with .NET 8 - Entity Framework Core with MSSQL LocalDB - Full CRUD for Materials, Suppliers, Projects, and Cutting Tools - Supplier stock length management for quick project setup - Integration with CutList.Core for bin packing optimization - Print-friendly HTML reports with efficiency statistics Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
12
CutList.Web/Data/Entities/CuttingTool.cs
Normal file
12
CutList.Web/Data/Entities/CuttingTool.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class CuttingTool
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public decimal KerfInches { get; set; }
|
||||
public bool IsDefault { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
public ICollection<Project> Projects { get; set; } = new List<Project>();
|
||||
}
|
||||
17
CutList.Web/Data/Entities/Material.cs
Normal file
17
CutList.Web/Data/Entities/Material.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class Material
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Shape { get; set; } = string.Empty;
|
||||
public string Size { get; set; } = string.Empty;
|
||||
public string? Description { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
public ICollection<SupplierStock> SupplierStocks { get; set; } = new List<SupplierStock>();
|
||||
public ICollection<Project> Projects { get; set; } = new List<Project>();
|
||||
|
||||
public string DisplayName => $"{Shape} - {Size}";
|
||||
}
|
||||
17
CutList.Web/Data/Entities/Project.cs
Normal file
17
CutList.Web/Data/Entities/Project.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class Project
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public int? MaterialId { get; set; }
|
||||
public int? CuttingToolId { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
public DateTime? UpdatedAt { get; set; }
|
||||
|
||||
public Material? Material { get; set; }
|
||||
public CuttingTool? CuttingTool { get; set; }
|
||||
public ICollection<ProjectPart> Parts { get; set; } = new List<ProjectPart>();
|
||||
public ICollection<ProjectStockBin> StockBins { get; set; } = new List<ProjectStockBin>();
|
||||
}
|
||||
13
CutList.Web/Data/Entities/ProjectPart.cs
Normal file
13
CutList.Web/Data/Entities/ProjectPart.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class ProjectPart
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int ProjectId { 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!;
|
||||
}
|
||||
13
CutList.Web/Data/Entities/ProjectStockBin.cs
Normal file
13
CutList.Web/Data/Entities/ProjectStockBin.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
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!;
|
||||
}
|
||||
13
CutList.Web/Data/Entities/Supplier.cs
Normal file
13
CutList.Web/Data/Entities/Supplier.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class Supplier
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Name { get; set; } = string.Empty;
|
||||
public string? ContactInfo { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
|
||||
public ICollection<SupplierStock> Stocks { get; set; } = new List<SupplierStock>();
|
||||
}
|
||||
15
CutList.Web/Data/Entities/SupplierStock.cs
Normal file
15
CutList.Web/Data/Entities/SupplierStock.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace CutList.Web.Data.Entities;
|
||||
|
||||
public class SupplierStock
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int SupplierId { get; set; }
|
||||
public int MaterialId { get; set; }
|
||||
public decimal LengthInches { get; set; }
|
||||
public decimal? Price { get; set; }
|
||||
public string? Notes { get; set; }
|
||||
public bool IsActive { get; set; } = true;
|
||||
|
||||
public Supplier Supplier { get; set; } = null!;
|
||||
public Material Material { get; set; } = null!;
|
||||
}
|
||||
Reference in New Issue
Block a user