AdoS0CustMaster.cs 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. namespace Admin.NET.Plugin.AiDOP.Entity.S0.Sales;
  2. /// <summary>
  3. /// 客户主数据(复刻 CustMaster)
  4. /// </summary>
  5. [SugarTable("CustMaster", "客户主数据(复刻 CustMaster)")]
  6. [SugarIndex("uk_CustMaster_factory_cust", nameof(FactoryRefId), OrderByType.Asc, nameof(Cust), OrderByType.Asc, IsUnique = true)]
  7. public class AdoS0CustMaster
  8. {
  9. [SugarColumn(ColumnName = "RecID", ColumnDescription = "主键", IsPrimaryKey = true, IsIdentity = true, ColumnDataType = "bigint")]
  10. public long Id { get; set; }
  11. [SugarColumn(ColumnName = "company_ref_id", ColumnDescription = "关联公司 ID", ColumnDataType = "bigint")]
  12. public long CompanyRefId { get; set; }
  13. [SugarColumn(ColumnName = "factory_ref_id", ColumnDescription = "关联工厂 ID", ColumnDataType = "bigint")]
  14. public long FactoryRefId { get; set; }
  15. [SugarColumn(ColumnName = "Domain", ColumnDescription = "工厂域编码", Length = 50, IsNullable = true)]
  16. public string? DomainCode { get; set; }
  17. [SugarColumn(ColumnName = "Cust", ColumnDescription = "客户编码", Length = 100)]
  18. public string Cust { get; set; } = string.Empty;
  19. [SugarColumn(ColumnName = "SortName", ColumnDescription = "客户简称", Length = 200, IsNullable = true)]
  20. public string? SortName { get; set; }
  21. [SugarColumn(ColumnName = "CustFullName", ColumnDescription = "客户全称/正式名称", Length = 500, IsNullable = true)]
  22. public string? CustFullName { get; set; }
  23. [SugarColumn(ColumnName = "Curr", ColumnDescription = "币种", Length = 20, IsNullable = true)]
  24. public string? Curr { get; set; }
  25. // 映射到 DB 物理列 Salesperson1(历史源平台命名)。
  26. // 修复 BUG-S0-CUST-SCHEMA-MISMATCH:避免 CodeFirst 按属性名自动建 Slspsn1 列造成双列分叉。
  27. // C# 属性名保留为 Slspsn1 以免波及 Dto/Controller/前端契约(路径 A 最小修复)。
  28. [SugarColumn(ColumnName = "Salesperson1", ColumnDescription = "主销售员", Length = 100, IsNullable = true)]
  29. public string? Slspsn1 { get; set; }
  30. [SugarColumn(ColumnName = "Slspsn2", ColumnDescription = "备用销售员", Length = 100, IsNullable = true)]
  31. public string? Slspsn2 { get; set; }
  32. [SugarColumn(ColumnName = "ShipTo", ColumnDescription = "发至", Length = 200, IsNullable = true)]
  33. public string? ShipTo { get; set; }
  34. [SugarColumn(ColumnName = "TaxClass", ColumnDescription = "税类型", Length = 50, IsNullable = true)]
  35. public string? TaxClass { get; set; }
  36. [SugarColumn(ColumnName = "TaxIn", ColumnDescription = "是否含税", ColumnDataType = "boolean")]
  37. public bool TaxIn { get; set; } = true;
  38. [SugarColumn(ColumnName = "cust_class", ColumnDescription = "客户级别", Length = 50, IsNullable = true)]
  39. public string? CustClass { get; set; }
  40. [SugarColumn(ColumnName = "address", ColumnDescription = "地址", Length = 500, IsNullable = true)]
  41. public string? Address { get; set; }
  42. [SugarColumn(ColumnName = "contact", ColumnDescription = "联系人", Length = 200, IsNullable = true)]
  43. public string? Contact { get; set; }
  44. [SugarColumn(ColumnName = "position", ColumnDescription = "职务", Length = 200, IsNullable = true)]
  45. public string? Position { get; set; }
  46. [SugarColumn(ColumnName = "contact_info", ColumnDescription = "联系方式", Length = 200, IsNullable = true)]
  47. public string? ContactInfo { get; set; }
  48. [SugarColumn(ColumnName = "CreditRating", ColumnDescription = "信用评级", Length = 50, IsNullable = true)]
  49. public string? CreditRating { get; set; }
  50. [SugarColumn(ColumnName = "Remarks", ColumnDescription = "备注", Length = 1000, IsNullable = true)]
  51. public string? Remarks { get; set; }
  52. [SugarColumn(ColumnName = "IsActive", ColumnDescription = "是否启用", ColumnDataType = "boolean")]
  53. public bool IsActive { get; set; } = true;
  54. [SugarColumn(ColumnName = "IsConfirm", ColumnDescription = "是否确认", ColumnDataType = "boolean")]
  55. public bool IsConfirm { get; set; }
  56. [SugarColumn(ColumnName = "CreateUser", ColumnDescription = "创建人", Length = 100, IsNullable = true)]
  57. public string? CreateUser { get; set; }
  58. [SugarColumn(ColumnName = "CreateTime", ColumnDescription = "创建时间")]
  59. public DateTime CreateTime { get; set; } = DateTime.Now;
  60. [SugarColumn(ColumnName = "UpdateUser", ColumnDescription = "更新人", Length = 100, IsNullable = true)]
  61. public string? UpdateUser { get; set; }
  62. [SugarColumn(ColumnName = "UpdateTime", ColumnDescription = "更新时间", IsNullable = true)]
  63. public DateTime? UpdateTime { get; set; }
  64. }