using ZB.MOM.WW.OtOpcUa.Configuration.Enums; namespace ZB.MOM.WW.OtOpcUa.Configuration.Entities; /// /// Immutable snapshot of a config artifact dispatched to every driver-role node by the /// ConfigPublishCoordinator. Replaces the v1 ConfigGeneration draft/publish /// row; the ArtifactBlob carries the SnapshotAndFlatten() output produced by /// AdminOperationsActor. /// public sealed class Deployment { /// Gets or sets the unique deployment identifier. public Guid DeploymentId { get; init; } = Guid.NewGuid(); /// Gets or sets the revision hash of the deployment artifact. public required string RevisionHash { get; init; } /// Gets or sets the deployment status. public DeploymentStatus Status { get; set; } = DeploymentStatus.Dispatching; /// Gets or sets the name of the user who created the deployment. public required string CreatedBy { get; init; } /// Gets or sets the UTC timestamp when the deployment was created. public DateTime CreatedAtUtc { get; init; } = DateTime.UtcNow; /// Gets or sets the serialized artifact blob containing the configuration. public byte[] ArtifactBlob { get; init; } = Array.Empty(); /// Gets or sets the row version for optimistic concurrency control. public byte[] RowVersion { get; set; } = Array.Empty(); /// Gets or sets the failure reason if the deployment failed. public string? FailureReason { get; set; } /// Gets or sets the UTC timestamp when the deployment was sealed. public DateTime? SealedAtUtc { get; set; } }