e00f46d723
Phase 1e of the v2 entity-model rewrite. With the FKs gone (Task 14b) and
the apply pipeline replaced (Task 14c), the v1 draft/publish entities have
no remaining v2 consumers.
Deleted entity classes:
src/Core/ZB.MOM.WW.OtOpcUa.Configuration/Entities/ConfigGeneration.cs
src/Core/ZB.MOM.WW.OtOpcUa.Configuration/Entities/ClusterNodeGenerationState.cs
Deleted enum classes (no v2 consumers):
src/Core/ZB.MOM.WW.OtOpcUa.Configuration/Enums/GenerationStatus.cs
src/Core/ZB.MOM.WW.OtOpcUa.Configuration/Enums/NodeApplyStatus.cs
OtOpcUaConfigDbContext changes:
- Removed DbSet<ConfigGeneration> ConfigGenerations
- Removed DbSet<ClusterNodeGenerationState> ClusterNodeGenerationStates
- Removed ConfigureConfigGeneration(modelBuilder) call + method body
- Removed ConfigureClusterNodeGenerationState(modelBuilder) call + body
- Tidied the "v2 deploy-model tables" header comment
Navigation property cleanup:
- ServerCluster.Generations collection -> removed
- ClusterNode.GenerationState navigation -> removed
doc-comment cref cleanup (replaced <see cref="X"/> with <c>X</c> for the
deleted types so the C# XML comment compiler doesn't fail with CS1574):
- Deployment.cs (cref to ConfigGeneration)
- NodeDeploymentState.cs (cref to ClusterNodeGenerationState)
- Core/OpcUa/EquipmentNodeWalker.cs (cref to ConfigGeneration in the
EquipmentNamespaceContent record's doc-comment; while there, removed
"All four collections are scoped to the same ConfigGeneration" since
that's no longer true in v2)
Verification:
src/Core/ZB.MOM.WW.OtOpcUa.Configuration -> 0 errors
src/Core/ZB.MOM.WW.OtOpcUa.Core -> 0 errors
tests/Core/ZB.MOM.WW.OtOpcUa.Configuration.Tests -> 0 errors
tests/Core/ZB.MOM.WW.OtOpcUa.Core.Tests -> 0 errors
whole solution -> 15 errors
(all in Server/Admin; transitive Server.Tests/Admin.Tests skip per the
parent's failure, so the per-project count dropped vs Task 14d's 71)
42 lines
1.2 KiB
C#
42 lines
1.2 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; }
|
|
|
|
public required string Name { get; set; }
|
|
|
|
/// <summary>UNS level 1. Canonical org value: "zb" per decision #140.</summary>
|
|
public required string Enterprise { get; set; }
|
|
|
|
/// <summary>UNS level 2, e.g. "warsaw-west".</summary>
|
|
public required string Site { get; set; }
|
|
|
|
public byte NodeCount { get; set; }
|
|
|
|
public required RedundancyMode RedundancyMode { get; set; }
|
|
|
|
public bool Enabled { get; set; } = true;
|
|
|
|
public string? Notes { get; set; }
|
|
|
|
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
|
|
|
public required string CreatedBy { get; set; }
|
|
|
|
public DateTime? ModifiedAt { get; set; }
|
|
|
|
public string? ModifiedBy { get; set; }
|
|
|
|
// Navigation
|
|
public ICollection<ClusterNode> Nodes { get; set; } = [];
|
|
public ICollection<Namespace> Namespaces { get; set; } = [];
|
|
}
|