| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- namespace Admin.NET.Plugin.AiDOP.Entity.S8.OrderFlow;
- /// <summary>
- /// ORDER-FLOW-S8-INTEGRATED-DOMAIN-RESET-1 t1b:S8 订单执行链路 L2 子节点。
- /// 首版用于 ORDER_REVIEW_PLAN_CALC 阶段的 5 个评审子节点(意见评审 / 意见反馈 /
- /// 二次评审 / 领导意见 / 合同盖章)。substep_code 白名单由 service / seed 约束,
- /// 不在 DB CHECK 中固化,便于后续扩展其它阶段的子节点。
- /// </summary>
- [SugarTable("ado_s8_order_flow_substep", "S8 订单执行链路 L2 子节点")]
- [SugarIndex("uk_order_flow_substep", nameof(OrderId), OrderByType.Asc, nameof(SubstepCode), OrderByType.Asc, IsUnique = true)]
- [SugarIndex("idx_order_flow_substep_order_code", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(OrderCode), OrderByType.Asc)]
- [SugarIndex("idx_order_flow_substep_flow", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(OrderFlowCode), OrderByType.Asc)]
- public class AdoS8OrderFlowSubstep
- {
- [SugarColumn(ColumnName = "id", IsPrimaryKey = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- /// <summary>外键 → ado_s8_order_flow_order.id。</summary>
- [SugarColumn(ColumnName = "order_id", ColumnDataType = "bigint")]
- public long OrderId { get; set; }
- /// <summary>冗余订单业务键,便于按 order_code 聚合。</summary>
- [SugarColumn(ColumnName = "order_code", Length = 64)]
- public string OrderCode { get; set; } = string.Empty;
- /// <summary>UPPER ORDER_FLOW node_code,首版主要承载 ORDER_REVIEW_PLAN_CALC。白名单由 service / seed 约束。</summary>
- [SugarColumn(ColumnName = "order_flow_code", Length = 64)]
- public string OrderFlowCode { get; set; } = string.Empty;
- /// <summary>L2 子节点编码:OPINION_REVIEW / OPINION_FEEDBACK / SECOND_REVIEW / LEADER_REVIEW / CONTRACT_SEAL。</summary>
- [SugarColumn(ColumnName = "substep_code", Length = 32)]
- public string SubstepCode { get; set; } = string.Empty;
- [SugarColumn(ColumnName = "substep_name", Length = 32)]
- public string SubstepName { get; set; } = string.Empty;
- /// <summary>PI 基线工时(小时)。t2b seed 按 PPT 第 2 页基线写入。</summary>
- [SugarColumn(ColumnName = "pi_hours", DecimalDigits = 1, Length = 6)]
- public decimal PiHours { get; set; }
- /// <summary>实际工时(小时)。nullable,未完成时为空。</summary>
- [SugarColumn(ColumnName = "actual_hours", DecimalDigits = 1, Length = 6, IsNullable = true)]
- public decimal? ActualHours { get; set; }
- /// <summary>green / yellow / red / pending。</summary>
- [SugarColumn(ColumnName = "status", Length = 16)]
- public string Status { get; set; } = "pending";
- [SugarColumn(ColumnName = "sort_no")]
- public int SortNo { get; set; }
- /// <summary>PPT / DEMO / PROD。</summary>
- [SugarColumn(ColumnName = "scenario_code", Length = 16)]
- public string ScenarioCode { get; set; } = "DEMO";
- /// <summary>SEED / IMPORT / AGG。</summary>
- [SugarColumn(ColumnName = "data_source", Length = 16)]
- public string DataSource { get; set; } = "SEED";
- [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
- public long TenantId { get; set; }
- [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
- public long FactoryId { get; set; }
- [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; }
- }
|