namespace ZB.MOM.WW.GalaxyRepository;

/// <summary>
///     A single Galaxy deploy notification. Published by <see cref="GalaxyHierarchyCache"/>
///     whenever a refresh detects that <c>galaxy.time_of_last_deploy</c> has changed (or on
///     the first successful refresh). Consumed by <see cref="IGalaxyDeployNotifier"/>
///     subscribers (the streaming gRPC RPC).
/// </summary>
/// <param name="Sequence">Monotonically increasing per process start; gaps indicate dropped events.</param>
/// <param name="ObservedAt">Server wall-clock when the cache observed the deploy.</param>
/// <param name="TimeOfLastDeploy">The <c>galaxy.time_of_last_deploy</c> value, or <see langword="null"/> when the Galaxy table reports none.</param>
/// <param name="ObjectCount">Number of objects in the hierarchy at the time of the event.</param>
/// <param name="AttributeCount">Number of attributes in the hierarchy at the time of the event.</param>
public sealed record GalaxyDeployEventInfo(
    long Sequence,
    DateTimeOffset ObservedAt,
    DateTimeOffset? TimeOfLastDeploy,
    int ObjectCount,
    int AttributeCount);
