namespace Admin.NET.Plugin.AiDOP.Entity.DataPlatform; [SugarTable("mdp_sync_task_formula", "MDP同步任务公式配置")] public class MdpSyncTaskFormula { [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] public long Id { get; set; } [SugarColumn(ColumnName = "tenant_id")] public long TenantId { get; set; } [SugarColumn(ColumnName = "task_code", Length = 100)] public string TaskCode { get; set; } = string.Empty; [SugarColumn(ColumnName = "step_code", Length = 100, IsNullable = true)] public string? StepCode { get; set; } [SugarColumn(ColumnName = "formula_code", Length = 100)] public string FormulaCode { get; set; } = string.Empty; [SugarColumn(ColumnName = "formula_name", Length = 200)] public string FormulaName { get; set; } = string.Empty; [SugarColumn(ColumnName = "metric_code", Length = 100, IsNullable = true)] public string? MetricCode { get; set; } [SugarColumn(ColumnName = "formula_expr", Length = 1000, IsNullable = true)] public string? FormulaExpr { get; set; } [SugarColumn(ColumnName = "formula_preview", Length = 1000, IsNullable = true)] public string? FormulaPreview { get; set; } [SugarColumn(ColumnName = "formula_refs", ColumnDataType = "text", IsNullable = true)] public string? FormulaRefs { get; set; } [SugarColumn(ColumnName = "calc_rule", ColumnDataType = "text", IsNullable = true)] public string? CalcRule { get; set; } [SugarColumn(ColumnName = "direction", Length = 40)] public string Direction { get; set; } = "higher_is_better"; [SugarColumn(ColumnName = "yellow_threshold", IsNullable = true)] public decimal? YellowThreshold { get; set; } [SugarColumn(ColumnName = "red_threshold", IsNullable = true)] public decimal? RedThreshold { get; set; } [SugarColumn(ColumnName = "version_no")] public int VersionNo { get; set; } = 1; [SugarColumn(ColumnName = "is_enabled")] public byte IsEnabled { get; set; } = 1; [SugarColumn(ColumnName = "sort_order")] public int SortOrder { get; set; } [SugarColumn(ColumnName = "description", Length = 1000, IsNullable = true)] public string? Description { get; set; } [SugarColumn(ColumnName = "create_time")] public DateTime CreateTime { get; set; } [SugarColumn(ColumnName = "update_time")] public DateTime UpdateTime { get; set; } }