| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- namespace Admin.NET.Plugin.AiDOP.Entity.S8.OrderFlow;
- /// <summary>
- /// ORDER-FLOW-S8-INTEGRATED-DOMAIN-RESET-1 t1b:S8 订单执行链路材料采购透视表。
- /// 承载供应商 × 线材规格的周期透视数据;order_id / order_code 允许为空:
- /// - NULL → baseline / PPT / DEMO 级别基线行
- /// - 非 NULL → 订单级透视行(后续扩展)
- /// cycle_days 使用 decimal(6,3) 以承载 YY 真值的 3 位小数精度。
- /// material_code / supplier_code / spec_code 的 TOTAL 值表示合计行 / 合计列。
- /// </summary>
- [SugarTable("ado_s8_order_flow_procurement_pivot", "S8 订单执行链路采购透视表")]
- [SugarIndex("idx_order_flow_proc_pivot_baseline", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(MaterialCode), OrderByType.Asc, nameof(SupplierCode), OrderByType.Asc, nameof(SpecCode), OrderByType.Asc)]
- [SugarIndex("idx_order_flow_proc_pivot_order", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(OrderCode), OrderByType.Asc)]
- [SugarIndex("idx_order_flow_proc_pivot_scenario", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(ScenarioCode), OrderByType.Asc, nameof(IsDeleted), OrderByType.Asc)]
- public class AdoS8OrderFlowProcurementPivot
- {
- [SugarColumn(ColumnName = "id", IsPrimaryKey = true, ColumnDataType = "bigint")]
- public long Id { get; set; }
- /// <summary>NULL = baseline 行;非 NULL = 订单级行。</summary>
- [SugarColumn(ColumnName = "order_id", ColumnDataType = "bigint", IsNullable = true)]
- public long? OrderId { get; set; }
- /// <summary>NULL = baseline 行;非 NULL = 订单业务键。</summary>
- [SugarColumn(ColumnName = "order_code", Length = 64, IsNullable = true)]
- public string? OrderCode { get; set; }
- /// <summary>材料编码:XX / YY / ZZ / TOTAL。TOTAL 表示合计行。</summary>
- [SugarColumn(ColumnName = "material_code", Length = 16)]
- public string MaterialCode { get; set; } = string.Empty;
- /// <summary>供应商编码:A / B / C / TOTAL。</summary>
- [SugarColumn(ColumnName = "supplier_code", Length = 16)]
- public string SupplierCode { get; set; } = string.Empty;
- /// <summary>线材规格:L4.5*11.2 / MT2*6.3 / MT1*5.4 / TOTAL。</summary>
- [SugarColumn(ColumnName = "spec_code", Length = 32)]
- public string SpecCode { get; set; } = string.Empty;
- /// <summary>周期天数。精度 decimal(6,3) 以承载 YY 真值最高位的 3 位小数。</summary>
- [SugarColumn(ColumnName = "cycle_days", DecimalDigits = 3, Length = 6)]
- public decimal CycleDays { get; set; }
- /// <summary>green / yellow / red。</summary>
- [SugarColumn(ColumnName = "status", Length = 16)]
- public string Status { get; set; } = "green";
- /// <summary>PPT(YY 真值)/ DEMO(XX, ZZ 演示 fixture)。</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; }
- }
|