using Extrudex.Domain.Base;

namespace Extrudex.Domain.Entities;

/// <summary>
/// Represents an AMS (Automatic Material System) unit installed on a Bambu Lab printer.
/// Each AMS unit contains multiple slots that hold spools.
/// </summary>
public class AmsUnit : AuditableEntity
{
    /// <summary>
    /// The 1-based index of this AMS unit on the printer (e.g., AMS 1, AMS 2).
    /// </summary>
    public int UnitIndex { get; set; }

    /// <summary>
    /// Foreign key to the parent Printer this AMS unit is installed on.
    /// </summary>
    public Guid PrinterId { get; set; }

    /// <summary>
    /// Navigation to the parent Printer.
    /// </summary>
    public Printer Printer { get; set; } = null!;

    /// <summary>
    /// Navigation collection of slots in this AMS unit.
    /// </summary>
    public ICollection<AmsSlot> Slots { get; set; } = new List<AmsSlot>();
}