74 lines
1.5 KiB
C#
74 lines
1.5 KiB
C#
namespace OrpaonVision.Core.Training.Contracts;
|
||
|
||
/// <summary>
|
||
/// 模型包激活结果。
|
||
/// </summary>
|
||
public sealed class ModelPackageActivationResultDto
|
||
{
|
||
/// <summary>
|
||
/// 模型包ID。
|
||
/// </summary>
|
||
public Guid ModelPackageId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 激活状态。
|
||
/// </summary>
|
||
public ModelPackageActivationStatus Status { get; init; }
|
||
|
||
/// <summary>
|
||
/// 激活消息。
|
||
/// </summary>
|
||
public string Message { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 是否需要回滚。
|
||
/// </summary>
|
||
public bool RequiresRollback { get; init; }
|
||
|
||
/// <summary>
|
||
/// 回滚原因。
|
||
/// </summary>
|
||
public string RollbackReason { get; init; } = string.Empty;
|
||
|
||
/// <summary>
|
||
/// 前一个激活的模型包ID。
|
||
/// </summary>
|
||
public Guid? PreviousModelPackageId { get; init; }
|
||
|
||
/// <summary>
|
||
/// 激活时间(UTC)。
|
||
/// </summary>
|
||
public DateTime ActivatedAtUtc { get; init; }
|
||
|
||
/// <summary>
|
||
/// 激活者。
|
||
/// </summary>
|
||
public string ActivatedBy { get; init; } = string.Empty;
|
||
}
|
||
|
||
/// <summary>
|
||
/// 模型包激活状态。
|
||
/// </summary>
|
||
public enum ModelPackageActivationStatus
|
||
{
|
||
/// <summary>
|
||
/// 激活中。
|
||
/// </summary>
|
||
Activating,
|
||
|
||
/// <summary>
|
||
/// 已激活。
|
||
/// </summary>
|
||
Activated,
|
||
|
||
/// <summary>
|
||
/// 激活失败。
|
||
/// </summary>
|
||
Failed,
|
||
|
||
/// <summary>
|
||
/// 已回滚。
|
||
/// </summary>
|
||
RolledBack
|
||
}
|