AdoDemoOrderFlow.cs 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S8.Demo;
  2. /// <summary>
  3. /// ORDER-FLOW-BE-DEMO-DATASET-RESET-1 演示主表:S8 订单执行档案 demo 主数据。
  4. /// 与真实业务订单(SeOrder/Order_*)完全解耦;仅供"订单执行档案"演示页面读取。
  5. /// </summary>
  6. [SugarTable("ado_demo_order_flow", "演示订单执行档案主表(demo only,不与真实业务表混用)")]
  7. [SugarIndex("uk_demo_order_flow_so_no", nameof(SoNo), OrderByType.Asc, true)]
  8. [SugarIndex("idx_demo_order_flow_tenant_factory", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(SortNo), OrderByType.Asc)]
  9. public class AdoDemoOrderFlow
  10. {
  11. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = false, ColumnDataType = "bigint")]
  12. public long Id { get; set; }
  13. [SugarColumn(ColumnName = "so_no", Length = 32)]
  14. public string SoNo { get; set; } = string.Empty;
  15. [SugarColumn(ColumnName = "product_name", Length = 128)]
  16. public string ProductName { get; set; } = string.Empty;
  17. [SugarColumn(ColumnName = "product_line", Length = 32)]
  18. public string ProductLine { get; set; } = string.Empty;
  19. [SugarColumn(ColumnName = "customer_name", Length = 128)]
  20. public string CustomerName { get; set; } = string.Empty;
  21. [SugarColumn(ColumnName = "customer_code", Length = 64)]
  22. public string CustomerCode { get; set; } = string.Empty;
  23. /// <summary>KA / SMB / MICRO。</summary>
  24. [SugarColumn(ColumnName = "customer_type", Length = 8)]
  25. public string CustomerType { get; set; } = "KA";
  26. [SugarColumn(ColumnName = "region", Length = 32)]
  27. public string Region { get; set; } = string.Empty;
  28. /// <summary>P1 / P2 / P3。</summary>
  29. [SugarColumn(ColumnName = "priority", Length = 4)]
  30. public string Priority { get; set; } = "P2";
  31. /// <summary>XX / YY / ZZ(与产品线对照)。</summary>
  32. [SugarColumn(ColumnName = "material_code", Length = 8)]
  33. public string MaterialCode { get; set; } = "XX";
  34. /// <summary>A / B / C。</summary>
  35. [SugarColumn(ColumnName = "supplier_group", Length = 8)]
  36. public string SupplierGroup { get; set; } = "A";
  37. /// <summary>completed / in_progress。</summary>
  38. [SugarColumn(ColumnName = "workflow_status", Length = 16)]
  39. public string WorkflowStatus { get; set; } = "completed";
  40. /// <summary>5 阶段 key 之一:order_review / product_design / material_procurement / body_production / final_assembly_shipping。</summary>
  41. [SugarColumn(ColumnName = "current_node_key", Length = 32)]
  42. public string CurrentNodeKey { get; set; } = "final_assembly_shipping";
  43. [SugarColumn(ColumnName = "focus_node_key", Length = 32)]
  44. public string FocusNodeKey { get; set; } = "final_assembly_shipping";
  45. [SugarColumn(ColumnName = "current_node_label", Length = 32)]
  46. public string CurrentNodeLabel { get; set; } = "总装发货";
  47. /// <summary>green / yellow / red。</summary>
  48. [SugarColumn(ColumnName = "node_status", Length = 8)]
  49. public string NodeStatus { get; set; } = "green";
  50. [SugarColumn(ColumnName = "release_at")]
  51. public DateTime ReleaseAt { get; set; }
  52. [SugarColumn(ColumnName = "target_cycle_days", DecimalDigits = 1, Length = 6)]
  53. public decimal TargetCycleDays { get; set; }
  54. [SugarColumn(ColumnName = "current_cycle_days", DecimalDigits = 1, Length = 6, IsNullable = true)]
  55. public decimal? CurrentCycleDays { get; set; }
  56. [SugarColumn(ColumnName = "actual_cycle_days", DecimalDigits = 1, Length = 6, IsNullable = true)]
  57. public decimal? ActualCycleDays { get; set; }
  58. [SugarColumn(ColumnName = "node_variance_days", DecimalDigits = 1, Length = 6, IsNullable = true)]
  59. public decimal? NodeVarianceDays { get; set; }
  60. [SugarColumn(ColumnName = "cumulative_variance_days", DecimalDigits = 1, Length = 6, IsNullable = true)]
  61. public decimal? CumulativeVarianceDays { get; set; }
  62. [SugarColumn(ColumnName = "exception_count")]
  63. public int ExceptionCount { get; set; }
  64. [SugarColumn(ColumnName = "response_minutes", IsNullable = true)]
  65. public int? ResponseMinutes { get; set; }
  66. [SugarColumn(ColumnName = "processing_minutes", IsNullable = true)]
  67. public int? ProcessingMinutes { get; set; }
  68. [SugarColumn(ColumnName = "total_loss_minutes", IsNullable = true)]
  69. public int? TotalLossMinutes { get; set; }
  70. /// <summary>待响应 / 处理中 / 已闭环。</summary>
  71. [SugarColumn(ColumnName = "exception_status", Length = 16)]
  72. public string ExceptionStatus { get; set; } = "已闭环";
  73. [SugarColumn(ColumnName = "sort_no")]
  74. public int SortNo { get; set; }
  75. [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
  76. public long TenantId { get; set; }
  77. [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
  78. public long FactoryId { get; set; }
  79. [SugarColumn(ColumnName = "created_at")]
  80. public DateTime CreatedAt { get; set; } = DateTime.Now;
  81. [SugarColumn(ColumnName = "updated_at", IsNullable = true)]
  82. public DateTime? UpdatedAt { get; set; }
  83. [SugarColumn(ColumnName = "is_deleted", ColumnDataType = "boolean")]
  84. public bool IsDeleted { get; set; }
  85. }