AdoSmartOpsKpiAtomicDay.cs 4.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. namespace Admin.NET.Plugin.AiDOP.Entity;
  2. /// <summary>
  3. /// KPI 最小颗粒度原子聚合层(日粒度)。存可二次聚合基础量,不存模块级最终汇总。
  4. /// </summary>
  5. [SugarTable("ado_smart_ops_kpi_atomic_day", "KPI原子聚合层(日)")]
  6. public class AdoSmartOpsKpiAtomicDay
  7. {
  8. [SugarColumn(ColumnName = "id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  9. public long Id { get; set; }
  10. [SugarColumn(ColumnName = "tenant_id", ColumnDescription = "租户ID", ColumnDataType = "bigint")]
  11. public long TenantId { get; set; }
  12. [SugarColumn(ColumnName = "factory_id", ColumnDescription = "工厂ID", ColumnDataType = "bigint")]
  13. public long FactoryId { get; set; } = 1;
  14. [SugarColumn(ColumnName = "domain_code", ColumnDescription = "业务对象域", Length = 50)]
  15. public string DomainCode { get; set; } = string.Empty;
  16. [SugarColumn(ColumnName = "metric_code", ColumnDescription = "指标编码", Length = 50)]
  17. public string MetricCode { get; set; } = string.Empty;
  18. [SugarColumn(ColumnName = "metric_level", ColumnDescription = "指标层级")]
  19. public int MetricLevel { get; set; } = 1;
  20. [SugarColumn(ColumnName = "stat_date", ColumnDescription = "统计日期", ColumnDataType = "date")]
  21. public DateTime StatDate { get; set; }
  22. [SugarColumn(ColumnName = "customer_code", ColumnDescription = "客户编码", Length = 100)]
  23. public string CustomerCode { get; set; } = string.Empty;
  24. [SugarColumn(ColumnName = "product_code", ColumnDescription = "产品编码", Length = 100)]
  25. public string ProductCode { get; set; } = string.Empty;
  26. [SugarColumn(ColumnName = "order_no", ColumnDescription = "订单号", Length = 100)]
  27. public string OrderNo { get; set; } = string.Empty;
  28. [SugarColumn(ColumnName = "production_line", ColumnDescription = "产线", Length = 100)]
  29. public string ProductionLine { get; set; } = string.Empty;
  30. [SugarColumn(ColumnName = "supplier_code", ColumnDescription = "供应商编码", Length = 100)]
  31. public string SupplierCode { get; set; } = string.Empty;
  32. [SugarColumn(ColumnName = "material_code", ColumnDescription = "物料编码", Length = 100)]
  33. public string MaterialCode { get; set; } = string.Empty;
  34. [SugarColumn(ColumnName = "po_no", ColumnDescription = "采购单号", Length = 100)]
  35. public string PoNo { get; set; } = string.Empty;
  36. [SugarColumn(ColumnName = "warehouse_code", ColumnDescription = "仓库编码", Length = 100)]
  37. public string WarehouseCode { get; set; } = string.Empty;
  38. [SugarColumn(ColumnName = "work_order_no", ColumnDescription = "工单号", Length = 100)]
  39. public string WorkOrderNo { get; set; } = string.Empty;
  40. [SugarColumn(ColumnName = "equipment_code", ColumnDescription = "设备编码", Length = 100)]
  41. public string EquipmentCode { get; set; } = string.Empty;
  42. [SugarColumn(ColumnName = "outbound_no", ColumnDescription = "出库单号", Length = 100)]
  43. public string OutboundNo { get; set; } = string.Empty;
  44. [SugarColumn(ColumnName = "sum_value", ColumnDescription = "可累加值", Length = 18, DecimalDigits = 6, IsNullable = true)]
  45. public decimal? SumValue { get; set; }
  46. [SugarColumn(ColumnName = "numerator_value", ColumnDescription = "比率分子", Length = 18, DecimalDigits = 6, IsNullable = true)]
  47. public decimal? NumeratorValue { get; set; }
  48. [SugarColumn(ColumnName = "denominator_value", ColumnDescription = "比率分母", Length = 18, DecimalDigits = 6, IsNullable = true)]
  49. public decimal? DenominatorValue { get; set; }
  50. [SugarColumn(ColumnName = "sample_count", ColumnDescription = "样本数", IsNullable = true)]
  51. public int? SampleCount { get; set; }
  52. [SugarColumn(ColumnName = "min_value", ColumnDescription = "最小值", Length = 18, DecimalDigits = 6, IsNullable = true)]
  53. public decimal? MinValue { get; set; }
  54. [SugarColumn(ColumnName = "max_value", ColumnDescription = "最大值", Length = 18, DecimalDigits = 6, IsNullable = true)]
  55. public decimal? MaxValue { get; set; }
  56. [SugarColumn(ColumnName = "batch_id", ColumnDescription = "MDP批次", Length = 100, IsNullable = true)]
  57. public string? BatchId { get; set; }
  58. [SugarColumn(ColumnName = "calc_time", ColumnDescription = "计算时间", IsNullable = true)]
  59. public DateTime? CalcTime { get; set; }
  60. [SugarColumn(ColumnName = "grain", ColumnDescription = "统计粒度", Length = 20)]
  61. public string Grain { get; set; } = "day";
  62. [SugarColumn(ColumnName = "is_deleted", ColumnDescription = "删除标识")]
  63. public int IsDeleted { get; set; }
  64. }