using ZB.MOM.WW.OtOpcUa.Commons.Types;

namespace ZB.MOM.WW.OtOpcUa.Commons.Messages.Fleet;

public enum FleetNodeHealth { Healthy, Degraded, Unreachable }

public sealed record FleetNodeStatus(
    NodeId NodeId,
    FleetNodeHealth Health,
    RevisionHash? CurrentRevision,
    DateTime LastSeenUtc);

/// <summary>
/// Periodic fleet-wide status broadcast pushed by <c>FleetStatusBroadcaster</c> to admin UI
/// subscribers via SignalR.
/// </summary>
public sealed record FleetStatusChanged(
    IReadOnlyList<FleetNodeStatus> Nodes,
    DeploymentId? CurrentDeployment,
    DateTime AsOfUtc,
    CorrelationId CorrelationId);
