129 lines
2.8 KiB
C#
129 lines
2.8 KiB
C#
namespace OrpaonVision.Core.Training.Contracts;
|
||
|
||
/// <summary>
|
||
/// 运行时部署快照。
|
||
/// </summary>
|
||
public sealed class RuntimeDeploymentSnapshot
|
||
{
|
||
/// <summary>
|
||
/// 快照ID。
|
||
/// </summary>
|
||
public Guid Id { get; init; } = Guid.NewGuid();
|
||
|
||
/// <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>
|
||
/// 机种编码。
|
||
/// </summary>
|
||
public string ProductTypeCode { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 规则版本ID。
|
||
/// </summary>
|
||
public Guid RuleVersionId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 规则版本号。
|
||
/// </summary>
|
||
public string RuleVersionNo { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 模型包版本ID。
|
||
/// </summary>
|
||
public Guid ModelPackageVersionId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 模型包版本号。
|
||
/// </summary>
|
||
public string ModelPackageVersionNo { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 运行时参数版本ID。
|
||
/// </summary>
|
||
public Guid RuntimeParameterVersionId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 运行时参数版本号。
|
||
/// </summary>
|
||
public string RuntimeParameterVersionNo { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 快照状态。
|
||
/// </summary>
|
||
public RuntimeDeploymentSnapshotStatus Status { get; init; }
|
||
|
||
/// <summary>
|
||
/// 创建时间(UTC)。
|
||
/// </summary>
|
||
public DateTime CreatedAtUtc { get; init; } = DateTime.UtcNow;
|
||
|
||
/// <summary>
|
||
/// 创建者。
|
||
/// </summary>
|
||
public string CreatedBy { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 激活时间(UTC)。
|
||
/// </summary>
|
||
public DateTime? ActivatedAtUtc { get; init; }
|
||
|
||
/// <summary>
|
||
/// 激活者。
|
||
/// </summary>
|
||
public string? ActivatedBy { get; init; }
|
||
|
||
/// <summary>
|
||
/// 回滚时间(UTC)。
|
||
/// </summary>
|
||
public DateTime? RolledBackAtUtc { get; init; }
|
||
|
||
/// <summary>
|
||
/// 回滚者。
|
||
/// </summary>
|
||
public string? RolledBackBy { get; init; }
|
||
|
||
/// <summary>
|
||
/// 快照元数据(JSON格式)。
|
||
/// </summary>
|
||
public string MetadataJson { get; init; } = string.Empty;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 运行时部署快照状态。
|
||
/// </summary>
|
||
public enum RuntimeDeploymentSnapshotStatus
|
||
{
|
||
/// <summary>
|
||
/// 草稿。
|
||
/// </summary>
|
||
Draft,
|
||
|
||
/// <summary>
|
||
/// 已激活。
|
||
/// </summary>
|
||
Activated,
|
||
|
||
/// <summary>
|
||
/// 已回滚。
|
||
/// </summary>
|
||
RolledBack,
|
||
|
||
/// <summary>
|
||
/// 已归档。
|
||
/// </summary>
|
||
Archived
|
||
}
|