namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;

/// <summary>Driver-scoped polling group. Tags reference it via <see cref="Tag.PollGroupId"/>.</summary>
public sealed class PollGroup
{
    /// <summary>Gets or sets the database row identifier for the polling group.</summary>
    public Guid PollGroupRowId { get; set; }

    /// <summary>Gets or sets the unique identifier for the polling group.</summary>
    public required string PollGroupId { get; set; }

    /// <summary>Gets or sets the driver instance that owns this polling group.</summary>
    public required string DriverInstanceId { get; set; }

    /// <summary>Gets or sets the display name of the polling group.</summary>
    public required string Name { get; set; }

    /// <summary>Gets or sets the poll interval in milliseconds.</summary>
    public int IntervalMs { get; set; }

    /// <summary>Optimistic concurrency token for last-write-wins detection in the v2 live-edit model.</summary>
    public byte[] RowVersion { get; set; } = Array.Empty<byte>();
}
