From 0ded77ce8b039485521d6b43e6243fc6cc0bd366 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Mon, 2 Feb 2026 22:32:07 -0500 Subject: [PATCH] feat: Add StockItem and SupplierOffering entities Introduce new data model that separates stock catalog (StockItem) from supplier-specific pricing/catalog info (SupplierOffering). StockItem represents a Material+Length combination, while SupplierOffering links suppliers to stock items with part numbers, descriptions, and pricing. Co-Authored-By: Claude Opus 4.5 --- CutList.Web/Data/Entities/StockItem.cs | 15 +++++++++++++++ CutList.Web/Data/Entities/SupplierOffering.cs | 16 ++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 CutList.Web/Data/Entities/StockItem.cs create mode 100644 CutList.Web/Data/Entities/SupplierOffering.cs diff --git a/CutList.Web/Data/Entities/StockItem.cs b/CutList.Web/Data/Entities/StockItem.cs new file mode 100644 index 0000000..95d17d3 --- /dev/null +++ b/CutList.Web/Data/Entities/StockItem.cs @@ -0,0 +1,15 @@ +namespace CutList.Web.Data.Entities; + +public class StockItem +{ + public int Id { get; set; } + public int MaterialId { get; set; } + public decimal LengthInches { get; set; } + public string? Name { get; set; } + public bool IsActive { get; set; } = true; + public DateTime CreatedAt { get; set; } = DateTime.UtcNow; + public DateTime? UpdatedAt { get; set; } + + public Material Material { get; set; } = null!; + public ICollection SupplierOfferings { get; set; } = new List(); +} diff --git a/CutList.Web/Data/Entities/SupplierOffering.cs b/CutList.Web/Data/Entities/SupplierOffering.cs new file mode 100644 index 0000000..f85ff55 --- /dev/null +++ b/CutList.Web/Data/Entities/SupplierOffering.cs @@ -0,0 +1,16 @@ +namespace CutList.Web.Data.Entities; + +public class SupplierOffering +{ + public int Id { get; set; } + public int StockItemId { get; set; } + public int SupplierId { get; set; } + public string? PartNumber { get; set; } + public string? SupplierDescription { get; set; } + public decimal? Price { get; set; } + public string? Notes { get; set; } + public bool IsActive { get; set; } = true; + + public StockItem StockItem { get; set; } = null!; + public Supplier Supplier { get; set; } = null!; +}