版本260406
This commit is contained in:
@@ -0,0 +1,146 @@
|
||||
namespace OrpaonVision.Core.Configuration.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 规则配置草稿。
|
||||
/// </summary>
|
||||
public sealed class RuleConfigurationDraftDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 机种编码。
|
||||
/// </summary>
|
||||
public string ProductTypeCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 机种名称。
|
||||
/// </summary>
|
||||
public string ProductTypeName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 层级配置集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<LayerConfigurationDto> Layers { get; init; } = Array.Empty<LayerConfigurationDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 部件配置集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<PartConfigurationDto> Parts { get; init; } = Array.Empty<PartConfigurationDto>();
|
||||
|
||||
/// <summary>
|
||||
/// ROI 配置集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<RoiConfigurationDto> Rois { get; init; } = Array.Empty<RoiConfigurationDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 规则项集合。
|
||||
/// </summary>
|
||||
public IReadOnlyCollection<RuleItemConfigurationDto> Rules { get; init; } = Array.Empty<RuleItemConfigurationDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 草稿操作人。
|
||||
/// </summary>
|
||||
public string? UpdatedBy { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 层级配置。
|
||||
/// </summary>
|
||||
public sealed class LayerConfigurationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 层号(从 1 开始)。
|
||||
/// </summary>
|
||||
public int LayerNo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 层名称。
|
||||
/// </summary>
|
||||
public string LayerName { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 部件配置。
|
||||
/// </summary>
|
||||
public sealed class PartConfigurationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 部件编码。
|
||||
/// </summary>
|
||||
public string PartCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 部件名称。
|
||||
/// </summary>
|
||||
public string PartName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 所属层号。
|
||||
/// </summary>
|
||||
public int LayerNo { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ROI 配置。
|
||||
/// </summary>
|
||||
public sealed class RoiConfigurationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// ROI 编码。
|
||||
/// </summary>
|
||||
public string RoiCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 关联部件编码。
|
||||
/// </summary>
|
||||
public string PartCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 左上角 X。
|
||||
/// </summary>
|
||||
public int X { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 左上角 Y。
|
||||
/// </summary>
|
||||
public int Y { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 宽度。
|
||||
/// </summary>
|
||||
public int Width { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 高度。
|
||||
/// </summary>
|
||||
public int Height { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 规则项配置。
|
||||
/// </summary>
|
||||
public sealed class RuleItemConfigurationDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 规则编码。
|
||||
/// </summary>
|
||||
public string RuleCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 规则名称。
|
||||
/// </summary>
|
||||
public string RuleName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 规则类型。
|
||||
/// </summary>
|
||||
public string RuleType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 规则参数 JSON。
|
||||
/// </summary>
|
||||
public string ParametersJson { get; init; } = "{}";
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用。
|
||||
/// </summary>
|
||||
public bool Enabled { get; init; } = true;
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
namespace OrpaonVision.Core.Configuration.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 规则版本操作审计记录。
|
||||
/// </summary>
|
||||
public sealed class RuleVersionAuditDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 机种编码。
|
||||
/// </summary>
|
||||
public string ProductTypeCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 操作类型(PUBLISH / ROLLBACK)。
|
||||
/// </summary>
|
||||
public string ActionType { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 当前动作对应版本号。
|
||||
/// </summary>
|
||||
public string? VersionNo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 源版本号。
|
||||
/// </summary>
|
||||
public string? SourceVersionNo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 目标版本号。
|
||||
/// </summary>
|
||||
public string? TargetVersionNo { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人。
|
||||
/// </summary>
|
||||
public string OperatorName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 操作时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime ActionAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 审计明细 JSON。
|
||||
/// </summary>
|
||||
public string? DetailJson { get; init; }
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
namespace OrpaonVision.Core.Configuration.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 规则版本对比结果。
|
||||
/// </summary>
|
||||
public sealed class RuleVersionCompareDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 机种编码。
|
||||
/// </summary>
|
||||
public string ProductTypeCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 对比源版本号。
|
||||
/// </summary>
|
||||
public string SourceVersionNo { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 对比目标版本号。
|
||||
/// </summary>
|
||||
public string TargetVersionNo { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 源版本快照 JSON。
|
||||
/// </summary>
|
||||
public string SourceSnapshotJson { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 目标版本快照 JSON。
|
||||
/// </summary>
|
||||
public string TargetSnapshotJson { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 版本是否一致。
|
||||
/// </summary>
|
||||
public bool IsSame { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 对比摘要。
|
||||
/// </summary>
|
||||
public string Summary { get; init; } = string.Empty;
|
||||
}
|
||||
52
OrpaonVision.Core/Configuration/Contracts/RuleVersionDto.cs
Normal file
52
OrpaonVision.Core/Configuration/Contracts/RuleVersionDto.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
namespace OrpaonVision.Core.Configuration.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// 规则版本信息。
|
||||
/// </summary>
|
||||
public sealed class RuleVersionDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 机种编码。
|
||||
/// </summary>
|
||||
public string ProductTypeCode { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 规则版本号。
|
||||
/// </summary>
|
||||
public string VersionNo { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 发布时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime PublishedAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 发布人。
|
||||
/// </summary>
|
||||
public string PublishedBy { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 状态:1=活跃,0=停用。
|
||||
/// </summary>
|
||||
public int Status { get; init; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 是否已停用。
|
||||
/// </summary>
|
||||
public bool IsDisabled { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 停用时间(UTC)。
|
||||
/// </summary>
|
||||
public DateTime? DisabledAtUtc { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 停用人。
|
||||
/// </summary>
|
||||
public string? DisabledBy { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// 规则快照 JSON。
|
||||
/// </summary>
|
||||
public string SnapshotJson { get; init; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user