namespace OrpaonVision.Core.Configuration.Contracts; /// /// 规则配置草稿。 /// public sealed class RuleConfigurationDraftDto { /// /// 机种编码。 /// public string ProductTypeCode { get; init; } = string.Empty; /// /// 机种名称。 /// public string ProductTypeName { get; init; } = string.Empty; /// /// 层级配置集合。 /// public IReadOnlyCollection Layers { get; init; } = Array.Empty(); /// /// 部件配置集合。 /// public IReadOnlyCollection Parts { get; init; } = Array.Empty(); /// /// ROI 配置集合。 /// public IReadOnlyCollection Rois { get; init; } = Array.Empty(); /// /// 规则项集合。 /// public IReadOnlyCollection Rules { get; init; } = Array.Empty(); /// /// 草稿操作人。 /// public string? UpdatedBy { get; init; } } /// /// 层级配置。 /// public sealed class LayerConfigurationDto { /// /// 层号(从 1 开始)。 /// public int LayerNo { get; init; } /// /// 层名称。 /// public string LayerName { get; init; } = string.Empty; } /// /// 部件配置。 /// public sealed class PartConfigurationDto { /// /// 部件编码。 /// public string PartCode { get; init; } = string.Empty; /// /// 部件名称。 /// public string PartName { get; init; } = string.Empty; /// /// 所属层号。 /// public int LayerNo { get; init; } } /// /// ROI 配置。 /// public sealed class RoiConfigurationDto { /// /// ROI 编码。 /// public string RoiCode { get; init; } = string.Empty; /// /// 关联部件编码。 /// public string PartCode { get; init; } = string.Empty; /// /// 左上角 X。 /// public int X { get; init; } /// /// 左上角 Y。 /// public int Y { get; init; } /// /// 宽度。 /// public int Width { get; init; } /// /// 高度。 /// public int Height { get; init; } } /// /// 规则项配置。 /// public sealed class RuleItemConfigurationDto { /// /// 规则编码。 /// public string RuleCode { get; init; } = string.Empty; /// /// 规则名称。 /// public string RuleName { get; init; } = string.Empty; /// /// 规则类型。 /// public string RuleType { get; init; } = string.Empty; /// /// 规则参数 JSON。 /// public string ParametersJson { get; init; } = "{}"; /// /// 是否启用。 /// public bool Enabled { get; init; } = true; }