65 lines
2.8 KiB
C#
65 lines
2.8 KiB
C#
namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities;
|
||
|
||
/// <summary>
|
||
/// UNS level-5 entity. Only for drivers in Equipment-kind namespaces.
|
||
/// Per decisions #109 (first-class), #116 (5-identifier model), #125 (system-generated EquipmentId),
|
||
/// #138–139 (OPC 40010 Identification fields as first-class columns).
|
||
/// </summary>
|
||
public sealed class Equipment
|
||
{
|
||
public Guid EquipmentRowId { get; set; }
|
||
|
||
public long GenerationId { get; set; }
|
||
|
||
/// <summary>
|
||
/// System-generated stable internal logical ID. Format: <c>'EQ-' + first 12 hex chars of EquipmentUuid</c>.
|
||
/// NEVER operator-supplied, NEVER in CSV imports, NEVER editable in Admin UI (decision #125).
|
||
/// </summary>
|
||
public required string EquipmentId { get; set; }
|
||
|
||
/// <summary>UUIDv4, IMMUTABLE across all generations of the same EquipmentId. Downstream-consumer join key.</summary>
|
||
public Guid EquipmentUuid { get; set; }
|
||
|
||
/// <summary>Logical FK to the driver providing data for this equipment.</summary>
|
||
public required string DriverInstanceId { get; set; }
|
||
|
||
/// <summary>Optional logical FK to a multi-device driver's device.</summary>
|
||
public string? DeviceId { get; set; }
|
||
|
||
/// <summary>Logical FK to <see cref="UnsLine.UnsLineId"/>.</summary>
|
||
public required string UnsLineId { get; set; }
|
||
|
||
/// <summary>UNS level 5 segment, matches <c>^[a-z0-9-]{1,32}$</c>.</summary>
|
||
public required string Name { get; set; }
|
||
|
||
// Operator-facing / external-system identifiers (decision #116)
|
||
|
||
/// <summary>Operator colloquial id (e.g. "machine_001"). Unique within cluster. Required.</summary>
|
||
public required string MachineCode { get; set; }
|
||
|
||
/// <summary>ERP equipment id. Unique fleet-wide via <see cref="ExternalIdReservation"/>. Primary browse identifier in Admin UI.</summary>
|
||
public string? ZTag { get; set; }
|
||
|
||
/// <summary>SAP PM equipment id. Unique fleet-wide via <see cref="ExternalIdReservation"/>.</summary>
|
||
public string? SAPID { get; set; }
|
||
|
||
// OPC UA Companion Spec OPC 40010 Machinery Identification fields (decision #139).
|
||
// All nullable so equipment can be added before identity is fully captured.
|
||
public string? Manufacturer { get; set; }
|
||
public string? Model { get; set; }
|
||
public string? SerialNumber { get; set; }
|
||
public string? HardwareRevision { get; set; }
|
||
public string? SoftwareRevision { get; set; }
|
||
public short? YearOfConstruction { get; set; }
|
||
public string? AssetLocation { get; set; }
|
||
public string? ManufacturerUri { get; set; }
|
||
public string? DeviceManualUri { get; set; }
|
||
|
||
/// <summary>Nullable hook for future schemas-repo template ID (decision #112).</summary>
|
||
public string? EquipmentClassRef { get; set; }
|
||
|
||
public bool Enabled { get; set; } = true;
|
||
|
||
public ConfigGeneration? Generation { get; set; }
|
||
}
|