- Remove SupplierStock entity - Update Material navigation from SupplierStocks to StockItems - Update Supplier navigation from Stocks to Offerings - Update ApplicationDbContext with new DbSets and configurations - Add unique constraints: StockItem(MaterialId, LengthInches) and SupplierOffering(SupplierId, StockItemId) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
19 lines
739 B
C#
19 lines
739 B
C#
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<StockItem> StockItems { get; set; } = new List<StockItem>();
|
|
public ICollection<MaterialStockLength> StockLengths { get; set; } = new List<MaterialStockLength>();
|
|
public ICollection<ProjectPart> ProjectParts { get; set; } = new List<ProjectPart>();
|
|
|
|
public string DisplayName => $"{Shape} - {Size}";
|
|
}
|