AdoS0PriorityRule.cs 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
  2. /// <summary>
  3. /// S0 订单优先级业务规则(ado_s0_sales_order_priority_rule)
  4. /// </summary>
  5. [SugarTable("ado_s0_sales_order_priority_rule", "S0 订单优先级业务规则")]
  6. public class AdoS0PriorityRule
  7. {
  8. [SugarColumn(ColumnName = "Id", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true)]
  9. public long Id { get; set; }
  10. [SugarColumn(ColumnName = "CompanyRefId", ColumnDescription = "公司 ID")]
  11. public long CompanyRefId { get; set; }
  12. [SugarColumn(ColumnName = "FactoryRefId", ColumnDescription = "工厂 ID")]
  13. public long FactoryRefId { get; set; }
  14. [SugarColumn(ColumnName = "Code", ColumnDescription = "规则编码", Length = 100)]
  15. public string Code { get; set; } = string.Empty;
  16. [SugarColumn(ColumnName = "Name", ColumnDescription = "规则名称", Length = 200)]
  17. public string Name { get; set; } = string.Empty;
  18. [SugarColumn(ColumnName = "PriorityLevel", ColumnDescription = "优先级数值(越小越高)")]
  19. public int PriorityLevel { get; set; }
  20. [SugarColumn(ColumnName = "SortDirection", ColumnDescription = "排序方向(asc/desc)", Length = 10)]
  21. public string SortDirection { get; set; } = "asc";
  22. [SugarColumn(ColumnName = "SourceEntity", ColumnDescription = "来源实体", Length = 200, IsNullable = true)]
  23. public string? SourceEntity { get; set; }
  24. [SugarColumn(ColumnName = "SourceField", ColumnDescription = "来源字段", Length = 200, IsNullable = true)]
  25. public string? SourceField { get; set; }
  26. [SugarColumn(ColumnName = "SourceFieldType", ColumnDescription = "来源字段类型", Length = 100, IsNullable = true)]
  27. public string? SourceFieldType { get; set; }
  28. [SugarColumn(ColumnName = "SourceLinkField", ColumnDescription = "来源关联字段", Length = 200, IsNullable = true)]
  29. public string? SourceLinkField { get; set; }
  30. [SugarColumn(ColumnName = "WorkOrderField", ColumnDescription = "工单字段", Length = 200, IsNullable = true)]
  31. public string? WorkOrderField { get; set; }
  32. [SugarColumn(ColumnName = "WorkOrderFieldType", ColumnDescription = "工单字段类型", Length = 100, IsNullable = true)]
  33. public string? WorkOrderFieldType { get; set; }
  34. [SugarColumn(ColumnName = "WorkOrderLinkField", ColumnDescription = "工单关联字段", Length = 200, IsNullable = true)]
  35. public string? WorkOrderLinkField { get; set; }
  36. [SugarColumn(ColumnName = "RuleExpr", ColumnDescription = "规则表达式 JSON", Length = 1000, IsNullable = true)]
  37. public string? RuleExpr { get; set; }
  38. [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 500, IsNullable = true)]
  39. public string? Remark { get; set; }
  40. [SugarColumn(ColumnName = "IsEnabled", ColumnDescription = "是否启用", ColumnDataType = "tinyint(1)")]
  41. public bool IsEnabled { get; set; } = true;
  42. [SugarColumn(ColumnName = "CreatedAt", ColumnDescription = "创建时间")]
  43. public DateTime CreatedAt { get; set; } = DateTime.Now;
  44. [SugarColumn(ColumnName = "UpdatedAt", ColumnDescription = "更新时间", IsNullable = true)]
  45. public DateTime? UpdatedAt { get; set; }
  46. /// <summary>客户类型显示标签(不落库,由业务层填充)</summary>
  47. [SugarColumn(IsIgnore = true)]
  48. public string? CustomerTypeLabel { get; set; }
  49. /// <summary>订单类型显示标签(不落库,由业务层填充)</summary>
  50. [SugarColumn(IsIgnore = true)]
  51. public string? OrderTypeLabel { get; set; }
  52. /// <summary>到期状态显示标签(不落库,由业务层填充)</summary>
  53. [SugarColumn(IsIgnore = true)]
  54. public string? DueStatusLabel { get; set; }
  55. }