using adas_core.Domain.Enums;
using MongoDB.Bson;

namespace adas_core.Domain.Models.Pumps;

/// <summary>
/// Represents an event related to a pump alarm, encapsulating data raised when an alarm condition is detected on a pump.
/// </summary>
public class PumpAlarmEvent
{
    public ObjectId Id { get; set; }
    
    // Dispositivo / contexto
    public string? DeviceId { get; set; }
    public string? RackId { get; set; }
    public string? DeviceTypeMdc { get; set; }

    public string? InfusionId { get; set; }
    public DateTime Time { get; set; }

    public ObjectId? PatientId { get; set; }
    
    // Alarma
    public PumpEnum.AlarmType? AlarmType { get; set; }
    public string? AlarmDescription { get; set; }
    public string? AlarmState { get; set; }                // active/inactive/latched
    public string? AlarmInactivationState { get; set; }    // enabled / alert-acknowledged~audio-paused
    public string? AlarmPriority { get; set; }             // PL/PM/PH
    public string? AlarmTypeMdc { get; set; }              // e.g., "ST"
    public PumpEnum.EventPhase? EventPhase { get; set; }   // start/continue/end

    public string? AlertSourceMdc { get; set; }            // p.ej. MDC_DEV_PUMP_INFUS_SYRINGE_VMD

    // Ubicación física / red (opcionales)
    public string? DeviceIp { get; set; }
    public string? PillarAssembly { get; set; }
    public string? PillarRackSlot { get; set; }


}