AdoSmartOpsKpiBusinessInput.cs 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using Admin.NET.Core;
  2. using SqlSugar;
  3. namespace Admin.NET.Plugin.AiDOP.Entity;
  4. /// <summary>
  5. /// KPI 业务来源与准备状态(KPI 级,一 KPI 一行)。独立于 ado_smart_ops_kpi_calc_config(版本模型)——
  6. /// 业务来源/准备是"指标级"元信息,无配置版本的 PENDING KPI 也要能登记,故不塞进版本表。
  7. /// 唯一键 (TenantId, MetricCode):MetricCode 已含模块身份(Sx_Ly_nnn),ModuleCode 仅冗余展示、由后端解析生成。
  8. /// BusinessInputStatus 决定 CONFIG_SQL 的试算/发布/激活门禁:仅 READY_FOR_CONFIG 放行。
  9. /// </summary>
  10. [SugarTable("ado_smart_ops_kpi_business_input", "KPI 业务来源与准备状态")]
  11. [SugarIndex("uk_kpi_biz_input_tenant_metric", nameof(TenantId), OrderByType.Asc, nameof(MetricCode), OrderByType.Asc, true)]
  12. public class AdoSmartOpsKpiBusinessInput : ITenantIdFilter
  13. {
  14. [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  15. public long Id { get; set; }
  16. [SugarColumn(ColumnDescription = "租户 ID(KPI 数据租户,后端解析)", ColumnDataType = "bigint", IsNullable = true)]
  17. public long? TenantId { get; set; }
  18. [SugarColumn(ColumnDescription = "指标编码 如 S5_L2_007", Length = 50)]
  19. public string MetricCode { get; set; } = string.Empty;
  20. [SugarColumn(ColumnDescription = "模块 S1~S9(由 MetricCode 解析,不信任前端)", Length = 20)]
  21. public string ModuleCode { get; set; } = string.Empty;
  22. [SugarColumn(ColumnDescription = "业务准备状态 PENDING_BUSINESS_FIELDS / PENDING_BUSINESS_SQL / READY_FOR_CONFIG", Length = 30)]
  23. public string BusinessInputStatus { get; set; } = "PENDING_BUSINESS_FIELDS";
  24. [SugarColumn(ColumnDescription = "来源系统 如 T8 / DOP-aidopdev / API", Length = 200, IsNullable = true)]
  25. public string? SourceSystem { get; set; }
  26. [SugarColumn(ColumnDescription = "来源表(逗号分隔)", Length = 500, IsNullable = true)]
  27. public string? SourceTables { get; set; }
  28. [SugarColumn(ColumnDescription = "来源字段", ColumnDataType = "text", IsNullable = true)]
  29. public string? SourceFields { get; set; }
  30. [SugarColumn(ColumnDescription = "SQL 来源 如 方老师提供 / DOP 内部自决", Length = 200, IsNullable = true)]
  31. public string? BusinessSqlSource { get; set; }
  32. [SugarColumn(ColumnDescription = "SQL 来源/业务口径说明", ColumnDataType = "text", IsNullable = true)]
  33. public string? BusinessSqlRemark { get; set; }
  34. [SugarColumn(ColumnDescription = "业务负责人(SQL 提供人)", Length = 100, IsNullable = true)]
  35. public string? BusinessOwner { get; set; }
  36. [SugarColumn(ColumnDescription = "字段负责人(字段提供人)", Length = 100, IsNullable = true)]
  37. public string? FieldOwner { get; set; }
  38. [SugarColumn(ColumnDescription = "备注", ColumnDataType = "text", IsNullable = true)]
  39. public string? Remark { get; set; }
  40. [SugarColumn(ColumnDescription = "创建人", Length = 100, IsNullable = true)]
  41. public string? CreatedBy { get; set; }
  42. [SugarColumn(ColumnDescription = "创建时间")]
  43. public DateTime CreatedAt { get; set; }
  44. [SugarColumn(ColumnDescription = "更新人", Length = 100, IsNullable = true)]
  45. public string? UpdatedBy { get; set; }
  46. [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)]
  47. public DateTime? UpdatedAt { get; set; }
  48. }