namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales; /// /// 客户主数据(复刻 CustMaster) /// [SugarTable("CustMaster", "客户主数据(复刻 CustMaster)")] [SugarIndex("uk_CustMaster_factory_cust", nameof(FactoryRefId), OrderByType.Asc, nameof(Cust), OrderByType.Asc, IsUnique = true)] public class AdoS0CustMaster : ITenantIdFilter { [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 = "Cust", ColumnDescription = "客户编码", Length = 100)] public string Cust { get; set; } = string.Empty; [SugarColumn(ColumnName = "SortName", ColumnDescription = "客户简称", Length = 200, IsNullable = true)] public string? SortName { get; set; } [SugarColumn(ColumnName = "CustFullName", ColumnDescription = "客户全称/正式名称", Length = 500, IsNullable = true)] public string? CustFullName { get; set; } [SugarColumn(ColumnName = "Curr", ColumnDescription = "币种", Length = 20, IsNullable = true)] public string? Curr { get; set; } // 映射到 DB 物理列 Salesperson1(历史源平台命名)。 // 修复 BUG-S0-CUST-SCHEMA-MISMATCH:避免 CodeFirst 按属性名自动建 Slspsn1 列造成双列分叉。 // C# 属性名保留为 Slspsn1 以免波及 Dto/Controller/前端契约(路径 A 最小修复)。 [SugarColumn(ColumnName = "Salesperson1", ColumnDescription = "主销售员", Length = 100, IsNullable = true)] public string? Slspsn1 { get; set; } [SugarColumn(ColumnName = "Slspsn2", ColumnDescription = "备用销售员", Length = 100, IsNullable = true)] public string? Slspsn2 { get; set; } [SugarColumn(ColumnName = "ShipTo", ColumnDescription = "发至", Length = 200, IsNullable = true)] public string? ShipTo { get; set; } [SugarColumn(ColumnName = "TaxClass", ColumnDescription = "税类型", Length = 50, IsNullable = true)] public string? TaxClass { get; set; } [SugarColumn(ColumnName = "TaxIn", ColumnDescription = "是否含税", ColumnDataType = "boolean")] public bool TaxIn { get; set; } = true; [SugarColumn(ColumnName = "cust_class", ColumnDescription = "客户级别", Length = 50, IsNullable = true)] public string? CustClass { get; set; } [SugarColumn(ColumnName = "address", ColumnDescription = "地址", Length = 500, IsNullable = true)] public string? Address { get; set; } [SugarColumn(ColumnName = "contact", ColumnDescription = "联系人", Length = 200, IsNullable = true)] public string? Contact { get; set; } [SugarColumn(ColumnName = "position", ColumnDescription = "职务", Length = 200, IsNullable = true)] public string? Position { get; set; } [SugarColumn(ColumnName = "contact_info", ColumnDescription = "联系方式", Length = 200, IsNullable = true)] public string? ContactInfo { get; set; } [SugarColumn(ColumnName = "CreditRating", ColumnDescription = "信用评级", Length = 50, IsNullable = true)] public string? CreditRating { get; set; } [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 1000, IsNullable = true)] public string? Remarks { get; set; } [SugarColumn(ColumnName = "IsActive", ColumnDescription = "是否启用", ColumnDataType = "boolean")] public bool IsActive { get; set; } = true; [SugarColumn(ColumnName = "IsConfirm", ColumnDescription = "是否确认", ColumnDataType = "boolean")] public bool IsConfirm { get; set; } [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(ColumnName = "tenant_id", IsNullable = true)] public long? TenantId { get; set; } }