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

/// <summary>UNS level-4 segment. Generation-versioned.</summary>
public sealed class UnsLine
{
    /// <summary>Gets or sets the unique row identifier for this UNS line.</summary>
    public Guid UnsLineRowId { get; set; }

    /// <summary>Gets or sets the unique identifier for this UNS line.</summary>
    public required string UnsLineId { get; set; }

    /// <summary>Logical FK to <see cref="UnsArea.UnsAreaId"/>.</summary>
    public required string UnsAreaId { get; set; }

    /// <summary>UNS level 4 segment: matches <c>^[a-z0-9-]{1,32}$</c> OR equals literal <c>_default</c>.</summary>
    public required string Name { get; set; }

    /// <summary>Gets or sets optional notes describing this UNS line.</summary>
    public string? Notes { 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>();
}
