Files
OrpaonVision/OrpaonVision.Core/Training/Contracts/Commands/RuntimeDeploymentSnapshotCommands.cs
2026-04-06 22:04:05 +08:00

90 lines
2.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace OrpaonVision.Core.Training.Contracts.Commands;
/// <summary>
/// 创建运行时部署快照命令。
/// </summary>
public sealed class CreateRuntimeDeploymentSnapshotCommand
{
/// <summary>
/// 快照名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 快照描述。
/// </summary>
public string Description { get; init; } = string.Empty;
/// <summary>
/// 机种ID。
/// </summary>
public Guid ProductTypeId { get; init; }
/// <summary>
/// 规则版本ID。
/// </summary>
public Guid RuleVersionId { get; init; }
/// <summary>
/// 模型包版本ID。
/// </summary>
public Guid ModelPackageVersionId { get; init; }
/// <summary>
/// 运行时参数版本ID。
/// </summary>
public Guid RuntimeParameterVersionId { get; init; }
/// <summary>
/// 创建者。
/// </summary>
public string CreatedBy { get; init; } = string.Empty;
/// <summary>
/// 快照元数据JSON格式
/// </summary>
public string MetadataJson { get; init; } = string.Empty;
}
/// <summary>
/// 激活运行时部署快照命令。
/// </summary>
public sealed class ActivateRuntimeDeploymentSnapshotCommand
{
/// <summary>
/// 快照ID。
/// </summary>
public Guid SnapshotId { get; init; }
/// <summary>
/// 激活者。
/// </summary>
public string ActivatedBy { get; init; } = string.Empty;
/// <summary>
/// 激活原因。
/// </summary>
public string Reason { get; init; } = string.Empty;
}
/// <summary>
/// 回滚到运行时部署快照命令。
/// </summary>
public sealed class RollbackToRuntimeDeploymentSnapshotCommand
{
/// <summary>
/// 目标快照ID。
/// </summary>
public Guid TargetSnapshotId { get; init; }
/// <summary>
/// 回滚者。
/// </summary>
public string RolledBackBy { get; init; } = string.Empty;
/// <summary>
/// 回滚原因。
/// </summary>
public string Reason { get; init; } = string.Empty;
}