using ZB.MOM.WW.OtOpcUa.Configuration.Enums;
namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
///
/// OPC UA namespace served by a cluster. Generation-versioned per decision #123 —
/// namespaces are content (affect what consumers see at the endpoint), not topology.
///
public sealed class Namespace
{
public Guid NamespaceRowId { get; set; }
/// Stable logical ID, e.g. "LINE3-OPCUA-equipment". Globally unique in v2.
public required string NamespaceId { get; set; }
public required string ClusterId { get; set; }
public required NamespaceKind Kind { get; set; }
/// E.g. "urn:zb:warsaw-west:equipment". Unique fleet-wide per generation.
public required string NamespaceUri { get; set; }
public bool Enabled { get; set; } = true;
public string? Notes { get; set; }
/// Optimistic concurrency token for last-write-wins detection in the v2 live-edit model.
public byte[] RowVersion { get; set; } = Array.Empty();
public ServerCluster? Cluster { get; set; }
}