版本260406
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
namespace OrpaonVision.Core.Training.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 创建运行时部署快照结果。
|
||||
/// </summary>
|
||||
public sealed class CreateRuntimeDeploymentSnapshotResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 快照ID。
|
||||
/// </summary>
|
||||
public Guid SnapshotId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 快照名称。
|
||||
/// </summary>
|
||||
public string Name { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 创建状态。
|
||||
/// </summary>
|
||||
public RuntimeDeploymentSnapshotOperationStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作消息。
|
||||
/// </summary>
|
||||
public string Message { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime CreatedAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建者。
|
||||
/// </summary>
|
||||
public string CreatedBy { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 激活运行时部署快照结果。
|
||||
/// </summary>
|
||||
public sealed class ActivateRuntimeDeploymentSnapshotResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 快照ID。
|
||||
/// </summary>
|
||||
public Guid SnapshotId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 激活状态。
|
||||
/// </summary>
|
||||
public RuntimeDeploymentSnapshotOperationStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作消息。
|
||||
/// </summary>
|
||||
public string Message { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 前一个激活的快照ID。
|
||||
/// </summary>
|
||||
public Guid? PreviousSnapshotId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 激活时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime ActivatedAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 激活者。
|
||||
/// </summary>
|
||||
public string ActivatedBy { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回滚到运行时部署快照结果。
|
||||
/// </summary>
|
||||
public sealed class RollbackToRuntimeDeploymentSnapshotResultDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 目标快照ID。
|
||||
/// </summary>
|
||||
public Guid TargetSnapshotId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 回滚前快照ID。
|
||||
/// </summary>
|
||||
public Guid? PreviousSnapshotId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 回滚状态。
|
||||
/// </summary>
|
||||
public RuntimeDeploymentSnapshotOperationStatus Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作消息。
|
||||
/// </summary>
|
||||
public string Message { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 回滚时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime RolledBackAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 回滚者。
|
||||
/// </summary>
|
||||
public string RolledBackBy { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 运行时部署快照操作状态。
|
||||
/// </summary>
|
||||
public enum RuntimeDeploymentSnapshotOperationStatus
|
||||
{
|
||||
/// <summary>
|
||||
/// 操作中。
|
||||
/// </summary>
|
||||
InProgress,
|
||||
|
||||
/// <summary>
|
||||
/// 成功。
|
||||
/// </summary>
|
||||
Succeeded,
|
||||
|
||||
/// <summary>
|
||||
/// 失败。
|
||||
/// </summary>
|
||||
Failed,
|
||||
|
||||
/// <summary>
|
||||
/// 部分成功。
|
||||
/// </summary>
|
||||
PartiallySucceeded
|
||||
}
|
||||
Reference in New Issue
Block a user