using Extrudex.Domain.Base;

namespace Extrudex.Domain.Entities;

/// <summary>
/// Base polymer/material type. This is a lookup table enforcing consistent
/// material naming across all spools. Free-text material names are not allowed.
/// </summary>
public class MaterialBase : AuditableEntity
{
    /// <summary>
    /// Human-readable name of the base material (e.g., "PLA", "PETG", "ABS").
    /// </summary>
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// Density of the material in g/cm³ (g/mL). Used for deriving grams consumed
    /// from mm extruded: grams = mm × cross_section_area × density.
    /// </summary>
    public decimal DensityGperCm3 { get; set; }

    /// <summary>
    /// Navigation collection of finishes available for this material base.
    /// </summary>
    public ICollection<MaterialFinish> Finishes { get; set; } = new List<MaterialFinish>();

    /// <summary>
    /// Navigation collection of modifiers applicable to this material base.
    /// </summary>
    public ICollection<MaterialModifier> Modifiers { get; set; } = new List<MaterialModifier>();

    /// <summary>
    /// Navigation collection of spools made from this material base.
    /// </summary>
    public ICollection<Spool> Spools { get; set; } = new List<Spool>();
}