namespace CutList.Web.Data.Entities;
public class Material
{
public int Id { get; set; }
public MaterialShape Shape { get; set; }
///
/// Material type (Steel, Aluminum, Stainless, etc.)
///
public MaterialType Type { get; set; }
///
/// Grade or specification (e.g., "A36", "Hot Roll", "304", "6061-T6")
///
public string? Grade { get; set; }
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; }
///
/// Sort order based on primary dimension (stored as thousandths of an inch for numeric sorting).
///
public int SortOrder { get; set; }
public ICollection StockItems { get; set; } = new List();
public ICollection JobParts { get; set; } = new List();
///
/// Optional parsed dimensions for decimal-based searching.
///
public MaterialDimensions? Dimensions { get; set; }
public string DisplayName => $"{Shape.GetDisplayName()} - {Size}";
}