Material entity changes: - Shape property now uses MaterialShape enum - Add Type (MaterialType) and Grade properties - Add SortOrder for numeric sorting - Add Dimensions navigation property (1:1) - Replace ProjectParts with JobParts collection StockItem entity changes: - Add QuantityOnHand for inventory tracking - Add Notes field - Add Transactions navigation property DbContext updates: - Configure MaterialDimensions TPH inheritance - Add enum-to-string conversions for MaterialShape and MaterialType - Configure shared column names for TPH properties - Add indexes on primary dimension columns - Update all entity relationships for Job model Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
722 B
C#
19 lines
722 B
C#
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 int QuantityOnHand { get; set; } = 0;
|
|
public string? Notes { 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<SupplierOffering> SupplierOfferings { get; set; } = new List<SupplierOffering>();
|
|
public ICollection<StockTransaction> Transactions { get; set; } = new List<StockTransaction>();
|
|
}
|