namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities; /// /// 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). /// public sealed class Equipment { public Guid EquipmentRowId { get; set; } public long GenerationId { get; set; } /// /// System-generated stable internal logical ID. Format: 'EQ-' + first 12 hex chars of EquipmentUuid. /// NEVER operator-supplied, NEVER in CSV imports, NEVER editable in Admin UI (decision #125). /// public required string EquipmentId { get; set; } /// UUIDv4, IMMUTABLE across all generations of the same EquipmentId. Downstream-consumer join key. public Guid EquipmentUuid { get; set; } /// Logical FK to the driver providing data for this equipment. public required string DriverInstanceId { get; set; } /// Optional logical FK to a multi-device driver's device. public string? DeviceId { get; set; } /// Logical FK to . public required string UnsLineId { get; set; } /// UNS level 5 segment, matches ^[a-z0-9-]{1,32}$. public required string Name { get; set; } // Operator-facing / external-system identifiers (decision #116) /// Operator colloquial id (e.g. "machine_001"). Unique within cluster. Required. public required string MachineCode { get; set; } /// ERP equipment id. Unique fleet-wide via . Primary browse identifier in Admin UI. public string? ZTag { get; set; } /// SAP PM equipment id. Unique fleet-wide via . 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; } /// Nullable hook for future schemas-repo template ID (decision #112). public string? EquipmentClassRef { get; set; } public bool Enabled { get; set; } = true; public ConfigGeneration? Generation { get; set; } }