| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using Admin.NET.Core;
- using SqlSugar;
- namespace Admin.NET.Plugin.AiDOP.Entity;
- /// <summary>
- /// KPI 维度执行运行日志。记录每次维度 SQL 执行的配置版本/数据源/状态/行数/耗时/错误/SQL 指纹。
- /// 不落明文 SQL;同批次同指标唯一。
- /// </summary>
- [SugarTable("ado_smart_ops_kpi_dimension_run_log", "KPI 维度执行运行日志")]
- [SugarIndex("uk_kpi_dim_run_metric_batch", nameof(MetricCode), OrderByType.Asc, nameof(BatchId), OrderByType.Asc, true)]
- public class AdoSmartOpsKpiDimensionRunLog : ITenantIdFilter
- {
- [SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- [SugarColumn(ColumnDescription = "租户 ID", ColumnDataType = "bigint", IsNullable = true)]
- public long? TenantId { get; set; }
- [SugarColumn(ColumnDescription = "批次号", Length = 100)]
- public string BatchId { get; set; } = string.Empty;
- [SugarColumn(ColumnDescription = "模块", Length = 20)]
- public string ModuleCode { get; set; } = string.Empty;
- [SugarColumn(ColumnDescription = "指标编码", Length = 50)]
- public string MetricCode { get; set; } = string.Empty;
- [SugarColumn(ColumnDescription = "维度配置 Id", IsNullable = true)]
- public long? DimensionConfigId { get; set; }
- [SugarColumn(ColumnDescription = "维度配置版本号", IsNullable = true)]
- public int? DimensionConfigVersion { get; set; }
- [SugarColumn(ColumnDescription = "绑定的汇总配置版本号", IsNullable = true)]
- public int? SummaryConfigVersion { get; set; }
- [SugarColumn(ColumnDescription = "数据源编码", Length = 100, IsNullable = true)]
- public string? DataSourceCode { get; set; }
- [SugarColumn(ColumnDescription = "业务日期")]
- public DateTime BizDate { get; set; }
- [SugarColumn(ColumnDescription = "开始时间")]
- public DateTime StartedAt { get; set; }
- [SugarColumn(ColumnDescription = "结束时间", IsNullable = true)]
- public DateTime? FinishedAt { get; set; }
- [SugarColumn(ColumnDescription = "耗时毫秒", IsNullable = true)]
- public long? DurationMs { get; set; }
- [SugarColumn(ColumnDescription = "状态 SUCCESS/NO_DATA/FAILED/NOT_CONFIGURED/VERSION_MISMATCH/VALIDATION_FAILED/TIMEOUT", Length = 30)]
- public string Status { get; set; } = string.Empty;
- [SugarColumn(ColumnDescription = "结果行数")]
- public int RowCount { get; set; }
- [SugarColumn(ColumnDescription = "错误码", Length = 60, IsNullable = true)]
- public string? ErrorCode { get; set; }
- [SugarColumn(ColumnDescription = "错误摘要", ColumnDataType = "text", IsNullable = true)]
- public string? ErrorMessage { get; set; }
- [SugarColumn(ColumnDescription = "SQL 指纹(SHA256 hex,无明文)", Length = 64, IsNullable = true)]
- public string? SqlHash { get; set; }
- [SugarColumn(ColumnDescription = "触发类型 AUTO/MANUAL/PREVIEW", Length = 20, IsNullable = true)]
- public string? TriggerType { get; set; }
- [SugarColumn(ColumnDescription = "创建时间")]
- public DateTime CreateTime { get; set; }
- }
|