namespace ZB.MOM.WW.OtOpcUa.Server;

/// <summary>
///     Bootstrap configuration read from <c>appsettings.json</c> (decision #18) — the minimum a
///     node needs to reach the central config DB and identify itself. Everything else comes from
///     the DB after bootstrap succeeds.
/// </summary>
public sealed class NodeOptions
{
    public const string SectionName = "Node";

    /// <summary>Stable node ID matching <c>ClusterNode.NodeId</c> in the central config DB.</summary>
    public required string NodeId { get; init; }

    /// <summary>Cluster this node belongs to.</summary>
    public required string ClusterId { get; init; }

    /// <summary>SQL Server connection string for the central config DB.</summary>
    public required string ConfigDbConnectionString { get; init; }

    /// <summary>Path to the LiteDB local cache file.</summary>
    public string LocalCachePath { get; init; } = "config_cache.db";
}
