cb720bb8c3
Shared-type foundation for Batch 1 fan-out (coordinator contracts commit): - New Commons/Types/RawPaths.cs — the v3 identity authority (Build/Combine/ Split/Leaf/TryParent/ValidateSegment, ordinal comparer). - New entities RawFolder, TagGroup, UnsTagReference. - Reshape DriverInstance (drop NamespaceId, add nullable RawFolderId), Tag (require DeviceId, add nullable TagGroupId, drop DriverInstanceId/ EquipmentId/FolderPath, keep WriteIdempotent), Equipment (drop DriverInstanceId/DeviceId), Device (doc: now universal), ServerCluster (nav Namespaces -> RawFolders). - Delete Namespace, EquipmentImportBatch(+Row), NamespaceKind enum. - DriverTypeMetadata: drop AllowedNamespaceKinds + NamespaceKindCompatibility. Solution is intentionally red below the foundation projects until Wave C integrates. Commons + Core.Abstractions compile green.
53 lines
2.1 KiB
C#
53 lines
2.1 KiB
C#
using ZB.MOM.WW.OtOpcUa.Configuration.Enums;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
|
|
|
|
/// <summary>
|
|
/// Top-level deployment unit. 1 or 2 <see cref="ClusterNode"/> members.
|
|
/// Per <c>config-db-schema.md</c> ServerCluster table.
|
|
/// </summary>
|
|
public sealed class ServerCluster
|
|
{
|
|
/// <summary>Stable logical ID, e.g. "LINE3-OPCUA".</summary>
|
|
public required string ClusterId { get; set; }
|
|
|
|
/// <summary>Gets or sets the display name for the server cluster.</summary>
|
|
public required string Name { get; set; }
|
|
|
|
/// <summary>UNS level 1. Canonical org value: "zb".</summary>
|
|
public required string Enterprise { get; set; }
|
|
|
|
/// <summary>UNS level 2, e.g. "warsaw-west".</summary>
|
|
public required string Site { get; set; }
|
|
|
|
/// <summary>Gets or sets the number of nodes in the cluster.</summary>
|
|
public byte NodeCount { get; set; }
|
|
|
|
/// <summary>Gets or sets the redundancy mode for the cluster.</summary>
|
|
public required RedundancyMode RedundancyMode { get; set; }
|
|
|
|
/// <summary>Gets or sets a value indicating whether the cluster is enabled.</summary>
|
|
public bool Enabled { get; set; } = true;
|
|
|
|
/// <summary>Gets or sets optional notes about the cluster.</summary>
|
|
public string? Notes { get; set; }
|
|
|
|
/// <summary>Gets or sets the UTC timestamp when the cluster was created.</summary>
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
/// <summary>Gets or sets the user who created the cluster.</summary>
|
|
public required string CreatedBy { get; set; }
|
|
|
|
/// <summary>Gets or sets the UTC timestamp when the cluster was last modified.</summary>
|
|
public DateTime? ModifiedAt { get; set; }
|
|
|
|
/// <summary>Gets or sets the user who last modified the cluster.</summary>
|
|
public string? ModifiedBy { get; set; }
|
|
|
|
// Navigation
|
|
/// <summary>Gets or sets the collection of cluster nodes.</summary>
|
|
public ICollection<ClusterNode> Nodes { get; set; } = [];
|
|
/// <summary>Gets or sets the collection of root-level Raw-tree folders in the cluster.</summary>
|
|
public ICollection<RawFolder> RawFolders { get; set; } = [];
|
|
}
|