using Admin.NET.Core; namespace Admin.NET.Plugin.AiDOP.Entity; /// /// 业务事实字典:供 KpiMaster.FormulaExpr 以 $FactCode 形式引用的分子/分母来源。 /// 下一批做 ETL 规则时将把 FactCode 映射到具体 SQL 模板。 /// [SugarTable("ado_smart_ops_business_fact", "业务事实字典")] [SugarIndex("uk_fact_code_tenant", nameof(FactCode), OrderByType.Asc, nameof(TenantId), OrderByType.Asc, true)] public class AdoSmartOpsBusinessFact : ITenantIdFilter { [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")] public long Id { get; set; } [SugarColumn(ColumnDescription = "事实编码(英文稳定码)", Length = 64)] public string FactCode { get; set; } = string.Empty; [SugarColumn(ColumnDescription = "事实名称(中文展示)", Length = 200)] public string FactName { get; set; } = string.Empty; [SugarColumn(ColumnDescription = "归属模块 S1~S9 或 COMMON", Length = 20, IsNullable = true)] public string? ModuleCode { get; set; } [SugarColumn(ColumnDescription = "单位", Length = 50, IsNullable = true)] public string? Unit { get; set; } [SugarColumn(ColumnDescription = "聚合类型 COUNT/SUM/AVG/MAX/MIN/LATEST", Length = 20, IsNullable = true)] public string? AggType { get; set; } [SugarColumn(ColumnDescription = "预期数据来源", Length = 200, IsNullable = true)] public string? DataSource { get; set; } [SugarColumn(ColumnDescription = "说明", ColumnDataType = "text", IsNullable = true)] public string? Description { get; set; } [SugarColumn(ColumnDescription = "启用")] public bool IsEnabled { get; set; } = true; [SugarColumn(ColumnDescription = "排序号")] public int SortNo { get; set; } [SugarColumn(ColumnDescription = "租户 ID", ColumnDataType = "bigint")] public long? TenantId { get; set; } [SugarColumn(ColumnDescription = "创建时间")] public DateTime CreatedAt { get; set; } = DateTime.Now; [SugarColumn(ColumnDescription = "更新时间", IsNullable = true)] public DateTime? UpdatedAt { get; set; } }