using Extrudex.Domain.Base;
namespace Extrudex.Domain.Entities;
///
/// Represents a single slot within an AMS unit. Each slot can hold one spool
/// and tracks the tray index, remaining weight, and which spool is loaded.
///
public class AmsSlot : AuditableEntity
{
///
/// The 1-based tray/slot index within the AMS unit (1-4 per unit).
///
public int TrayIndex { get; set; }
///
/// Foreign key to the AMS unit this slot belongs to.
///
public Guid AmsUnitId { get; set; }
///
/// Navigation to the parent AMS unit.
///
public AmsUnit AmsUnit { get; set; } = null!;
///
/// Foreign key to the spool currently loaded in this slot. Null if empty.
///
public Guid? SpoolId { get; set; }
///
/// Navigation to the spool currently loaded in this slot. Null if no spool is loaded.
///
public Spool? Spool { get; set; }
///
/// Remaining filament weight in grams as reported by the AMS.
/// Bambu Lab AMS reports remaining weight per tray.
///
public decimal? RemainingWeightG { get; set; }
}