namespace OrpaonVision.Core.Training.Contracts; /// /// 规则快照包校验结果。 /// public sealed class RuleSnapshotValidationResultDto { /// /// 是否通过校验。 /// public bool IsValid { get; init; } /// /// 校验错误信息。 /// public string[] Errors { get; init; } = Array.Empty(); /// /// 校验警告信息。 /// public string[] Warnings { get; init; } = Array.Empty(); /// /// 层顺序校验结果。 /// public LayerOrderValidationResultDto LayerOrderValidation { get; init; } = new(); /// /// 部件编码唯一性校验结果。 /// public PartCodeUniquenessValidationResultDto PartCodeUniquenessValidation { get; init; } = new(); /// /// Schema合法性校验结果。 /// public SchemaValidationResultDto SchemaValidation { get; init; } = new(); } /// /// 层顺序校验结果。 /// public sealed class LayerOrderValidationResultDto { /// /// 是否通过校验。 /// public bool IsValid { get; init; } /// /// 错误信息。 /// public string[] Errors { get; init; } = Array.Empty(); /// /// 实际层顺序。 /// public string[] ActualLayerOrder { get; init; } = Array.Empty(); /// /// 期望层顺序。 /// public string[] ExpectedLayerOrder { get; init; } = Array.Empty(); } /// /// 部件编码唯一性校验结果。 /// public sealed class PartCodeUniquenessValidationResultDto { /// /// 是否通过校验。 /// public bool IsValid { get; init; } /// /// 错误信息。 /// public string[] Errors { get; init; } = Array.Empty(); /// /// 重复的部件编码。 /// public string[] DuplicatePartCodes { get; init; } = Array.Empty(); /// /// 所有部件编码。 /// public string[] AllPartCodes { get; init; } = Array.Empty(); } /// /// Schema合法性校验结果。 /// public sealed class SchemaValidationResultDto { /// /// 是否通过校验。 /// public bool IsValid { get; init; } /// /// 错误信息。 /// public string[] Errors { get; init; } = Array.Empty(); /// /// 警告信息。 /// public string[] Warnings { get; init; } = Array.Empty(); /// /// Schema版本。 /// public string SchemaVersion { get; init; } = string.Empty; /// /// 校验的文件路径。 /// public string[] ValidatedFiles { get; init; } = Array.Empty(); }