namespace OrpaonVision.Core.Training.Contracts;
///
/// 模型包校验结果。
///
public sealed class ModelPackageValidationResultDto
{
///
/// 模型包ID。
///
public Guid ModelPackageId { get; init; }
///
/// 总体校验状态。
///
public ModelPackageValidationStatus Status { get; init; }
///
/// 校验消息。
///
public string Message { get; init; } = string.Empty;
///
/// 文件级校验结果。
///
public FileLevelValidationResultDto FileLevelValidation { get; init; } = new();
///
/// 结构级校验结果。
///
public StructureLevelValidationResultDto StructureLevelValidation { get; init; } = new();
///
/// 内容级校验结果。
///
public ContentLevelValidationResultDto ContentLevelValidation { get; init; } = new();
///
/// 业务兼容性校验结果。
///
public BusinessCompatibilityValidationResultDto BusinessCompatibilityValidation { get; init; } = new();
///
/// 校验时间(UTC)。
///
public DateTime ValidatedAtUtc { get; init; }
///
/// 校验者。
///
public string ValidatedBy { get; init; } = string.Empty;
}
///
/// 模型包校验状态。
///
public enum ModelPackageValidationStatus
{
///
/// 校验中。
///
Validating,
///
/// 校验通过。
///
Passed,
///
/// 校验失败。
///
Failed,
///
/// 警告(部分通过)。
///
Warning
}
///
/// 文件级校验结果。
///
public sealed class FileLevelValidationResultDto
{
///
/// 是否通过。
///
public bool Passed { get; init; }
///
/// 错误信息。
///
public List Errors { get; init; } = new();
///
/// 警告信息。
///
public List Warnings { get; init; } = new();
}
///
/// 结构级校验结果。
///
public sealed class StructureLevelValidationResultDto
{
///
/// 是否通过。
///
public bool Passed { get; init; }
///
/// 错误信息。
///
public List Errors { get; init; } = new();
///
/// 警告信息。
///
public List Warnings { get; init; } = new();
}
///
/// 内容级校验结果。
///
public sealed class ContentLevelValidationResultDto
{
///
/// 是否通过。
///
public bool Passed { get; init; }
///
/// 错误信息。
///
public List Errors { get; init; } = new();
///
/// 警告信息。
///
public List Warnings { get; init; } = new();
}
///
/// 业务兼容性校验结果。
///
public sealed class BusinessCompatibilityValidationResultDto
{
///
/// 是否通过。
///
public bool Passed { get; init; }
///
/// 错误信息。
///
public List Errors { get; init; } = new();
///
/// 警告信息。
///
public List Warnings { get; init; } = new();
///
/// 当前运行端版本。
///
public string CurrentRuntimeVersion { get; init; } = string.Empty;
///
/// 最低运行端版本要求。
///
public string MinRuntimeVersion { get; init; } = string.Empty;
///
/// 当前机种编码。
///
public string CurrentProductTypeCode { get; init; } = string.Empty;
///
/// 适用机种列表。
///
public List ApplicableProductTypes { get; init; } = new();
}