namespace OrpaonVision.Model.Configuration;
///
/// ROI配置模型。
///
public sealed class RoiConfigModel
{
///
/// ROI ID。
///
public Guid Id { get; set; }
///
/// 部件ID。
///
public Guid ComponentConfigId { get; set; }
///
/// ROI名称。
///
public string Name { get; set; } = string.Empty;
///
/// ROI描述。
///
public string? Description { get; set; }
///
/// ROI类型。
///
public RoiType Type { get; set; }
///
/// X坐标(相对坐标,0-1)。
///
public double X { get; set; }
///
/// Y坐标(相对坐标,0-1)。
///
public double Y { get; set; }
///
/// 宽度(相对坐标,0-1)。
///
public double Width { get; set; }
///
/// 高度(相对坐标,0-1)。
///
public double Height { get; set; }
///
/// ROI状态。
///
public RoiStatus Status { get; set; }
///
/// 是否启用。
///
public bool IsEnabled { get; set; }
///
/// 排序序号。
///
public int SortOrder { get; set; }
///
/// 创建时间(UTC)。
///
public DateTime CreatedAtUtc { get; set; }
///
/// 更新时间(UTC)。
///
public DateTime UpdatedAtUtc { get; set; }
///
/// 创建人。
///
public string CreatedBy { get; set; } = string.Empty;
///
/// 更新人。
///
public string UpdatedBy { get; set; } = string.Empty;
///
/// 备注。
///
public string? Remark { get; set; }
}
///
/// ROI类型枚举。
///
public enum RoiType
{
///
/// 矩形。
///
Rectangle = 0,
///
/// 圆形。
///
Circle = 1,
///
/// 多边形。
///
Polygon = 2,
///
/// 椭圆形。
///
Ellipse = 3
}
///
/// ROI状态枚举。
///
public enum RoiStatus
{
///
/// 启用。
///
Enabled = 0,
///
/// 禁用。
///
Disabled = 1,
///
/// 隐藏。
///
Hidden = 2
}
///
/// 规则配置模型。
///
public sealed class RuleConfigModel
{
///
/// 规则ID。
///
public Guid Id { get; set; }
///
/// 部件ID。
///
public Guid ComponentConfigId { get; set; }
///
/// 规则名称。
///
public string Name { get; set; } = string.Empty;
///
/// 规则描述。
///
public string? Description { get; set; }
///
/// 规则类型。
///
public RuleType Type { get; set; }
///
/// 规则参数JSON。
///
public string RuleParametersJson { get; set; } = string.Empty;
///
/// 规则状态。
///
public RuleStatus Status { get; set; }
///
/// 优先级。
///
public int Priority { get; set; }
///
/// 是否启用。
///
public bool IsEnabled { get; set; }
///
/// 排序序号。
///
public int SortOrder { get; set; }
///
/// 创建时间(UTC)。
///
public DateTime CreatedAtUtc { get; set; }
///
/// 更新时间(UTC)。
///
public DateTime UpdatedAtUtc { get; set; }
///
/// 创建人。
///
public string CreatedBy { get; set; } = string.Empty;
///
/// 更新人。
///
public string UpdatedBy { get; set; } = string.Empty;
///
/// 备注。
///
public string? Remark { get; set; }
}
///
/// 规则类型枚举。
///
public enum RuleType
{
///
/// 数量规则。
///
Quantity = 0,
///
/// 位置规则。
///
Position = 1,
///
/// 到位规则。
///
InPlace = 2,
///
/// 顺序规则。
///
Sequence = 3,
///
/// 禁装规则。
///
Forbidden = 4,
///
/// 超时规则。
///
Timeout = 5,
///
/// 层切换规则。
///
LayerSwitch = 6,
///
/// 机完成规则。
///
MachineComplete = 7
}
///
/// 规则状态枚举。
///
public enum RuleStatus
{
///
/// 启用。
///
Enabled = 0,
///
/// 禁用。
///
Disabled = 1,
///
/// 测试中。
///
Testing = 2
}