|
|
@@ -0,0 +1,95 @@
|
|
|
+namespace Admin.NET.Plugin.AiDOP.Entity.S8.OrderFlow;
|
|
|
+
|
|
|
+/// <summary>
|
|
|
+/// ORDER-FLOW-S8-INTEGRATED-DOMAIN-RESET-1 t1a:S8 订单执行链路主档(正式领域表)。
|
|
|
+/// 替代 ado_demo_order_flow;order_code 为业务键;不保留异常数预存字段,
|
|
|
+/// 异常数由 ado_s8_exception 实时聚合,order 表只持有 response/processing/loss KPI。
|
|
|
+/// </summary>
|
|
|
+[SugarTable("ado_s8_order_flow_order", "S8 订单执行链路主档")]
|
|
|
+[SugarIndex("uk_order_flow_order_code", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(OrderCode), OrderByType.Asc, IsUnique = true)]
|
|
|
+[SugarIndex("idx_order_flow_order_current_flow", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(CurrentOrderFlowCode), OrderByType.Asc)]
|
|
|
+[SugarIndex("idx_order_flow_order_customer", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(CustomerCode), OrderByType.Asc)]
|
|
|
+public class AdoS8OrderFlowOrder
|
|
|
+{
|
|
|
+ [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
|
|
|
+ public long Id { get; set; }
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
|
|
|
+ public long TenantId { get; set; }
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
|
|
|
+ public long FactoryId { get; set; }
|
|
|
+
|
|
|
+ /// <summary>订单业务键,全局唯一(tenant/factory 维度)。</summary>
|
|
|
+ [SugarColumn(ColumnName = "order_code", Length = 64)]
|
|
|
+ public string OrderCode { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "product_name", Length = 128)]
|
|
|
+ public string ProductName { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "product_line", Length = 32)]
|
|
|
+ public string ProductLine { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "customer_code", Length = 64)]
|
|
|
+ public string CustomerCode { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "customer_name", Length = 128)]
|
|
|
+ public string CustomerName { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ /// <summary>KA / SMB / MICRO。</summary>
|
|
|
+ [SugarColumn(ColumnName = "customer_type", Length = 16)]
|
|
|
+ public string CustomerType { get; set; } = "KA";
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "region", Length = 32)]
|
|
|
+ public string Region { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ /// <summary>P1 / P2 / P3。</summary>
|
|
|
+ [SugarColumn(ColumnName = "priority", Length = 16)]
|
|
|
+ public string Priority { get; set; } = "P2";
|
|
|
+
|
|
|
+ /// <summary>completed / in_progress。</summary>
|
|
|
+ [SugarColumn(ColumnName = "workflow_status", Length = 32)]
|
|
|
+ public string WorkflowStatus { get; set; } = "in_progress";
|
|
|
+
|
|
|
+ /// <summary>UPPER ORDER_FLOW node_code(5 选 1):ORDER_REVIEW_PLAN_CALC / PRODUCT_DESIGN / MATERIAL_PURCHASE / BODY_PRODUCTION / FINAL_ASSEMBLY_DELIVERY。白名单由 service 层校验。</summary>
|
|
|
+ [SugarColumn(ColumnName = "current_order_flow_code", Length = 64)]
|
|
|
+ public string CurrentOrderFlowCode { get; set; } = string.Empty;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "release_at")]
|
|
|
+ public DateTime ReleaseAt { get; set; }
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "target_cycle_days", DecimalDigits = 1, Length = 6)]
|
|
|
+ public decimal TargetCycleDays { get; set; }
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "actual_cycle_days", DecimalDigits = 1, Length = 6, IsNullable = true)]
|
|
|
+ public decimal? ActualCycleDays { get; set; }
|
|
|
+
|
|
|
+ /// <summary>KPI:响应时长(分钟)。来源 = 主档业务字段,不从 ado_s8_exception 派生。</summary>
|
|
|
+ [SugarColumn(ColumnName = "response_minutes", IsNullable = true)]
|
|
|
+ public int? ResponseMinutes { get; set; }
|
|
|
+
|
|
|
+ /// <summary>KPI:处理时长(分钟)。来源 = 主档业务字段。</summary>
|
|
|
+ [SugarColumn(ColumnName = "processing_minutes", IsNullable = true)]
|
|
|
+ public int? ProcessingMinutes { get; set; }
|
|
|
+
|
|
|
+ /// <summary>KPI:总损失时长(分钟)。来源 = 主档业务字段。</summary>
|
|
|
+ [SugarColumn(ColumnName = "total_loss_minutes", IsNullable = true)]
|
|
|
+ public int? TotalLossMinutes { get; set; }
|
|
|
+
|
|
|
+ /// <summary>PPT / DEMO / PROD。SO-2026-001 = PPT;其余 19 单 = DEMO。</summary>
|
|
|
+ [SugarColumn(ColumnName = "scenario_code", Length = 16)]
|
|
|
+ public string ScenarioCode { get; set; } = "DEMO";
|
|
|
+
|
|
|
+ /// <summary>SEED / IMPORT / AGG。t2a seed 全部为 SEED。</summary>
|
|
|
+ [SugarColumn(ColumnName = "data_source", Length = 16)]
|
|
|
+ public string DataSource { get; set; } = "SEED";
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "created_at")]
|
|
|
+ public DateTime CreatedAt { get; set; } = DateTime.Now;
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "updated_at", IsNullable = true)]
|
|
|
+ public DateTime? UpdatedAt { get; set; }
|
|
|
+
|
|
|
+ [SugarColumn(ColumnName = "is_deleted", ColumnDataType = "boolean")]
|
|
|
+ public bool IsDeleted { get; set; }
|
|
|
+}
|