namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
///
/// 订单优先级配置(复刻 PriorityCode)
///
[SugarTable("PriorityCode", "订单优先级配置(复刻 PriorityCode)")]
public class AdoS0PriorityCode
{
[SugarColumn(ColumnName = "RecID", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
public long Id { get; set; }
[SugarColumn(ColumnName = "company_ref_id", ColumnDescription = "关联公司 ID", ColumnDataType = "bigint")]
public long CompanyRefId { get; set; }
[SugarColumn(ColumnName = "factory_ref_id", ColumnDescription = "关联工厂 ID", ColumnDataType = "bigint")]
public long FactoryRefId { get; set; }
[SugarColumn(ColumnName = "Domain", ColumnDescription = "工厂域编码", Length = 50, IsNullable = true)]
public string? DomainCode { get; set; }
[SugarColumn(ColumnName = "Descr", ColumnDescription = "名称", Length = 200)]
public string Descr { get; set; } = string.Empty;
[SugarColumn(ColumnName = "Value", ColumnDescription = "工单表字段", Length = 200, IsNullable = true)]
public string? Value { get; set; }
[SugarColumn(ColumnName = "Priority", ColumnDescription = "优先级")]
public int Priority { get; set; }
/// 源系统 OrderBy:0=倒序,非0=正序
[SugarColumn(ColumnName = "order_by_code", ColumnDescription = "排序方式编码")]
public int OrderByCode { get; set; } = 1;
[SugarColumn(ColumnName = "SourceTable", ColumnDescription = "来源表", Length = 200, IsNullable = true)]
public string? SourceTable { get; set; }
[SugarColumn(ColumnName = "SourceColumn", ColumnDescription = "来源表字段", Length = 200, IsNullable = true)]
public string? SourceColumn { get; set; }
[SugarColumn(ColumnName = "SourceType", ColumnDescription = "来源表字段类型", Length = 100, IsNullable = true)]
public string? SourceType { get; set; }
[SugarColumn(ColumnName = "SourceID", ColumnDescription = "来源表关联字段", Length = 200, IsNullable = true)]
public string? SourceId { get; set; }
[SugarColumn(ColumnName = "ValueType", ColumnDescription = "工单表字段类型", Length = 100, IsNullable = true)]
public string? ValueType { get; set; }
[SugarColumn(ColumnName = "ValueID", ColumnDescription = "工单表关联字段", Length = 200, IsNullable = true)]
public string? ValueId { get; set; }
[SugarColumn(ColumnName = "ScopeCustClass", ColumnDescription = "业务维度:客户类型/级别", Length = 100, IsNullable = true)]
public string? ScopeCustClass { get; set; }
[SugarColumn(ColumnName = "ScopeOrderType", ColumnDescription = "业务维度:订单类型", Length = 100, IsNullable = true)]
public string? ScopeOrderType { get; set; }
[SugarColumn(ColumnName = "ScopeDueDaysMax", ColumnDescription = "业务维度:承诺交期上限天数", IsNullable = true)]
public int? ScopeDueDaysMax { get; set; }
[SugarColumn(ColumnName = "IsActive", ColumnDescription = "是否生效", ColumnDataType = "boolean")]
public bool IsActive { get; set; } = true;
[SugarColumn(ColumnName = "CreateUser", ColumnDescription = "创建人", Length = 100, IsNullable = true)]
public string? CreateUser { get; set; }
[SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间")]
public DateTime CreateTime { get; set; } = DateTime.Now;
[SugarColumn(ColumnName = "UpdateUser", ColumnDescription = "更新人", Length = 100, IsNullable = true)]
public string? UpdateUser { get; set; }
[SugarColumn(ColumnName = "UpdateTime", ColumnDescription = "更新时间", IsNullable = true)]
public DateTime? UpdateTime { get; set; }
/// 列表展示:正序/倒序(不落库)
[SugarColumn(IsIgnore = true)]
public string? OrderByText { get; set; }
}