using ZB.MOM.WW.OtOpcUa.Configuration.Enums;

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

/// <summary>
///     OPC UA namespace served by a cluster. Generation-versioned per decision #123 —
///     namespaces are content (affect what consumers see at the endpoint), not topology.
/// </summary>
public sealed class Namespace
{
    public Guid NamespaceRowId { get; set; }

    public long GenerationId { get; set; }

    /// <summary>Stable logical ID across generations, e.g. "LINE3-OPCUA-equipment".</summary>
    public required string NamespaceId { get; set; }

    public required string ClusterId { get; set; }

    public required NamespaceKind Kind { get; set; }

    /// <summary>E.g. "urn:zb:warsaw-west:equipment". Unique fleet-wide per generation.</summary>
    public required string NamespaceUri { get; set; }

    public bool Enabled { get; set; } = true;

    public string? Notes { get; set; }

    public ConfigGeneration? Generation { get; set; }
    public ServerCluster? Cluster { get; set; }
}
