Files
lmxopcua/src/Core/ZB.MOM.WW.OtOpcUa.Configuration/Entities/RawFolder.cs
T
Joseph Doherty cb720bb8c3 v3 batch1 contracts: RawPaths identity helper + reshaped greenfield entities
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.
2026-07-15 18:52:19 -04:00

31 lines
1.4 KiB
C#

namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
/// <summary>
/// v3 Raw-tree driver-organizing folder. Nestable (Kepware-style) directly under a cluster or
/// under another <see cref="RawFolder"/>. Folders group <see cref="DriverInstance"/> rows; they
/// contribute the leading segments of a driver's <c>RawPath</c>.
/// </summary>
public sealed class RawFolder
{
/// <summary>Gets or sets the database row identifier (PK).</summary>
public Guid RawFolderRowId { get; set; }
/// <summary>Stable logical ID, unique fleet-wide.</summary>
public required string RawFolderId { get; set; }
/// <summary>Logical FK to <see cref="ServerCluster.ClusterId"/> — the folder is cluster-rooted.</summary>
public required string ClusterId { get; set; }
/// <summary>Logical FK to a parent <see cref="RawFolder.RawFolderId"/>; <see langword="null"/> = root under the cluster.</summary>
public string? ParentRawFolderId { get; set; }
/// <summary>Sibling-unique folder name. A RawPath segment: no <c>/</c>, no lead/trail whitespace.</summary>
public required string Name { get; set; }
/// <summary>Sibling display ordering.</summary>
public int SortOrder { get; set; }
/// <summary>Optimistic concurrency token for last-write-wins detection in the v2 live-edit model.</summary>
public byte[] RowVersion { get; set; } = Array.Empty<byte>();
}