refactor: Update Material and StockItem entities
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>
This commit is contained in:
@@ -6,10 +6,13 @@ public class StockItem
|
||||
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>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user