AdoS8ConfigDraft.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S8;
  2. [SugarTable("ado_s8_config_draft", "S8 统一配置器草稿")]
  3. [SugarIndex("idx_s8_config_draft_tfs", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(Status), OrderByType.Asc)]
  4. [SugarIndex("uk_s8_config_draft_tenant_factory_code", nameof(TenantId), OrderByType.Asc, nameof(FactoryId), OrderByType.Asc, nameof(DraftCode), OrderByType.Asc, IsUnique = true)]
  5. [SugarIndex("idx_s8_config_draft_generated_rule", nameof(GeneratedRuleId), OrderByType.Asc)]
  6. public class AdoS8ConfigDraft
  7. {
  8. [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  9. public long Id { get; set; }
  10. [SugarColumn(ColumnName = "tenant_id", ColumnDataType = "bigint")]
  11. public long TenantId { get; set; }
  12. [SugarColumn(ColumnName = "factory_id", ColumnDataType = "bigint")]
  13. public long FactoryId { get; set; }
  14. [SugarColumn(ColumnName = "draft_code", Length = 64)]
  15. public string DraftCode { get; set; } = string.Empty;
  16. [SugarColumn(ColumnName = "draft_name", Length = 128, IsNullable = true)]
  17. public string? DraftName { get; set; }
  18. /// <summary>草稿状态:IN_PROGRESS / GENERATED。</summary>
  19. [SugarColumn(ColumnName = "status", Length = 32)]
  20. public string Status { get; set; } = "IN_PROGRESS";
  21. [SugarColumn(ColumnName = "current_step")]
  22. public int CurrentStep { get; set; }
  23. [SugarColumn(ColumnName = "mechanism", Length = 32, IsNullable = true)]
  24. public string? Mechanism { get; set; }
  25. [SugarColumn(ColumnName = "stage_code", Length = 16, IsNullable = true)]
  26. public string? StageCode { get; set; }
  27. [SugarColumn(ColumnName = "order_flow_code", Length = 64, IsNullable = true)]
  28. public string? OrderFlowCode { get; set; }
  29. [SugarColumn(ColumnName = "exception_type_code", Length = 64, IsNullable = true)]
  30. public string? ExceptionTypeCode { get; set; }
  31. /// <summary>向导态序列化 JSON;列表不返回此字段。</summary>
  32. [SugarColumn(ColumnName = "wizard_json", ColumnDataType = "mediumtext")]
  33. public string WizardJson { get; set; } = string.Empty;
  34. /// <summary>generate-rule 成功后回写 ado_s8_watch_rule.id;幂等返回依据。</summary>
  35. [SugarColumn(ColumnName = "generated_rule_id", ColumnDataType = "bigint", IsNullable = true)]
  36. public long? GeneratedRuleId { get; set; }
  37. [SugarColumn(ColumnName = "remark", Length = 512, IsNullable = true)]
  38. public string? Remark { get; set; }
  39. [SugarColumn(ColumnName = "created_at")]
  40. public DateTime CreatedAt { get; set; } = DateTime.Now;
  41. [SugarColumn(ColumnName = "updated_at", IsNullable = true)]
  42. public DateTime? UpdatedAt { get; set; }
  43. }