using System.Text.Json.Serialization; namespace Nonemm.App.Configuration; /// One cluster node in the operator's list. N1MM keeps the same list in its /// admin database and calls it Favorites. public sealed record StoredClusterNode { public string Name { get; init; } = ""; public string Host { get; init; } = ""; public int Port { get; init; } = 7373; /// Only the few nodes that ask for one; most take the callsign alone. public string Password { get; init; } = ""; /// Sent to this node after login, one command per entry. public IReadOnlyList Commands { get; init; } = []; /// How the node reads in the favourites list. [JsonIgnore] public string Label => Name.Length > 0 ? $"{Name} — {Host}:{Port}" : $"{Host}:{Port}"; }