ItemMaster.cs 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. namespace Admin.NET.Plugin.AiDOP.Universal;
  2. /// <summary>
  3. /// 物料主数据(ItemMaster 表,外部 ERP 表,只读映射)
  4. /// </summary>
  5. [IgnoreTable]
  6. [SugarTable("ItemMaster", "物料主数据")]
  7. public class ItemMaster
  8. {
  9. [SugarColumn(ColumnName = "RecID", IsPrimaryKey = true, IsIdentity = true)]
  10. public int RecID { get; set; }
  11. [SugarColumn(ColumnName = "Domain", Length = 50, IsNullable = true)]
  12. public string? Domain { get; set; }
  13. [SugarColumn(ColumnName = "ItemNum", Length = 100)]
  14. public string ItemNum { get; set; } = string.Empty;
  15. [SugarColumn(ColumnName = "Descr", Length = 200)]
  16. public string Descr { get; set; } = string.Empty;
  17. [SugarColumn(ColumnName = "Descr1", Length = 200, IsNullable = true)]
  18. public string? Descr1 { get; set; }
  19. [SugarColumn(ColumnName = "UM", Length = 50, IsNullable = true)]
  20. public string? UM { get; set; }
  21. [SugarColumn(ColumnName = "Location", Length = 100, IsNullable = true)]
  22. public string? Location { get; set; }
  23. [SugarColumn(ColumnName = "Rev", Length = 50, IsNullable = true)]
  24. public string? Rev { get; set; }
  25. [SugarColumn(ColumnName = "Drawing", Length = 100, IsNullable = true)]
  26. public string? Drawing { get; set; }
  27. [SugarColumn(ColumnName = "Status", Length = 8, IsNullable = true)]
  28. public string? Status { get; set; }
  29. [SugarColumn(ColumnName = "ItemType", Length = 100, IsNullable = true)]
  30. public string? ItemType { get; set; }
  31. [SugarColumn(ColumnName = "PurMfg", Length = 100, IsNullable = true)]
  32. public string? PurMfg { get; set; }
  33. [SugarColumn(ColumnName = "Site", Length = 12, IsNullable = true)]
  34. public string? Site { get; set; }
  35. [SugarColumn(ColumnName = "Buyer", Length = 8, IsNullable = true)]
  36. public string? Buyer { get; set; }
  37. [SugarColumn(ColumnName = "Planner", Length = 50, IsNullable = true)]
  38. public string? Planner { get; set; }
  39. [SugarColumn(ColumnName = "ProdLine", Length = 20, IsNullable = true)]
  40. public string? ProdLine { get; set; }
  41. [SugarColumn(ColumnName = "PurUM", Length = 4, IsNullable = true)]
  42. public string? PurUM { get; set; }
  43. [SugarColumn(ColumnName = "PkgCode", Length = 50, IsNullable = true)]
  44. public string? PkgCode { get; set; }
  45. [SugarColumn(ColumnName = "DefaultShelf", Length = 100, IsNullable = true)]
  46. public string? DefaultShelf { get; set; }
  47. [SugarColumn(ColumnName = "KeyItem", ColumnDataType = "tinyint(1)")]
  48. public bool KeyItem { get; set; }
  49. [SugarColumn(ColumnName = "NetWeight", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  50. public decimal? NetWeight { get; set; }
  51. [SugarColumn(ColumnName = "NetWeightUM", Length = 50, IsNullable = true)]
  52. public string? NetWeightUM { get; set; }
  53. [SugarColumn(ColumnName = "Inspect", ColumnDataType = "tinyint(1)")]
  54. public bool Inspect { get; set; }
  55. [SugarColumn(ColumnName = "IssuePolicy", ColumnDataType = "tinyint(1)")]
  56. public bool IssuePolicy { get; set; }
  57. [SugarColumn(ColumnName = "PurLT", IsNullable = true)]
  58. public int? PurLT { get; set; }
  59. [SugarColumn(ColumnName = "InsLT", IsNullable = true)]
  60. public int? InsLT { get; set; }
  61. [SugarColumn(ColumnName = "MfgLT", IsNullable = true)]
  62. public int? MfgLT { get; set; }
  63. [SugarColumn(ColumnName = "Length", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  64. public decimal? Length { get; set; }
  65. [SugarColumn(ColumnName = "Size", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  66. public decimal? Size { get; set; }
  67. [SugarColumn(ColumnName = "SizeUM", Length = 50, IsNullable = true)]
  68. public string? SizeUM { get; set; }
  69. [SugarColumn(ColumnName = "LocationType", Length = 50, IsNullable = true)]
  70. public string? LocationType { get; set; }
  71. [SugarColumn(ColumnName = "CommodityCode", Length = 100, IsNullable = true)]
  72. public string? CommodityCode { get; set; }
  73. [SugarColumn(ColumnName = "MaxOrd", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  74. public decimal? MaxOrd { get; set; }
  75. [SugarColumn(ColumnName = "MinOrd", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  76. public decimal? MinOrd { get; set; }
  77. [SugarColumn(ColumnName = "OrdMult", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  78. public decimal? OrdMult { get; set; }
  79. [SugarColumn(ColumnName = "MinOrdSales", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  80. public decimal? MinOrdSales { get; set; }
  81. [SugarColumn(ColumnName = "AutoLotNums", ColumnDataType = "tinyint(1)")]
  82. public bool AutoLotNums { get; set; }
  83. [SugarColumn(ColumnName = "Install", ColumnDataType = "tinyint(1)")]
  84. public bool Install { get; set; }
  85. [SugarColumn(ColumnName = "SafetyStk", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  86. public decimal? SafetyStk { get; set; }
  87. [SugarColumn(ColumnName = "DaysBetweenPM", IsNullable = true)]
  88. public int? DaysBetweenPM { get; set; }
  89. [SugarColumn(ColumnName = "ExpireAlarmDays", IsNullable = true)]
  90. public int? ExpireAlarmDays { get; set; }
  91. [SugarColumn(ColumnName = "StockTurnOver", ColumnDataType = "decimal(18,5)", IsNullable = true)]
  92. public decimal? StockTurnOver { get; set; }
  93. [SugarColumn(ColumnName = "LotSerialControl", ColumnDataType = "tinyint(1)")]
  94. public bool LotSerialControl { get; set; }
  95. [SugarColumn(ColumnName = "AllocateSingleLot", ColumnDataType = "tinyint(1)")]
  96. public bool AllocateSingleLot { get; set; }
  97. [SugarColumn(ColumnName = "TraceDetail", ColumnDataType = "bit(1)", IsNullable = true)]
  98. public bool? TraceDetail { get; set; }
  99. [SugarColumn(ColumnName = "IsMainMas", ColumnDataType = "bit(1)", IsNullable = true)]
  100. public bool? IsMainMas { get; set; }
  101. [SugarColumn(ColumnName = "EMTType", Length = 50, IsNullable = true)]
  102. public string? EmtType { get; set; }
  103. [SugarColumn(ColumnName = "OwnerApplication", Length = 100, IsNullable = true)]
  104. public string? OwnerApplication { get; set; }
  105. [SugarColumn(ColumnName = "ModDate", IsNullable = true)]
  106. public DateTime? ModDate { get; set; }
  107. [SugarColumn(ColumnName = "CreateTime", IsNullable = true)]
  108. public DateTime? CreateTime { get; set; }
  109. [SugarColumn(ColumnName = "UpdateTime", IsNullable = true)]
  110. public DateTime? UpdateTime { get; set; }
  111. [SugarColumn(ColumnName = "CreateUser", Length = 24, IsNullable = true)]
  112. public string? CreateUser { get; set; }
  113. [SugarColumn(ColumnName = "UpdateUser", Length = 24, IsNullable = true)]
  114. public string? UpdateUser { get; set; }
  115. [SugarColumn(ColumnName = "IsActive", ColumnDataType = "bit(1)", IsNullable = true)]
  116. public bool? IsActive { get; set; }
  117. [SugarColumn(ColumnName = "IsConfirm", ColumnDataType = "bit(1)", IsNullable = true)]
  118. public bool? IsConfirm { get; set; }
  119. [SugarColumn(ColumnName = "Remark", Length = 200, IsNullable = true)]
  120. public string? Remark { get; set; }
  121. // 扩展列:与 ItemMaster 中下划线字段保持映射,避免后续查询缺列
  122. [SugarColumn(ColumnName = "rec_id")]
  123. public long RecIdEx { get; set; }
  124. [SugarColumn(ColumnName = "company_ref_id")]
  125. public long CompanyRefId { get; set; }
  126. [SugarColumn(ColumnName = "factory_ref_id")]
  127. public long FactoryRefId { get; set; }
  128. [SugarColumn(ColumnName = "domain_code", Length = 50, IsNullable = true)]
  129. public string? DomainCode { get; set; }
  130. [SugarColumn(ColumnName = "item_num", Length = 100)]
  131. public string ItemNumEx { get; set; } = string.Empty;
  132. [SugarColumn(ColumnName = "is_active", ColumnDataType = "tinyint(1)")]
  133. public bool IsActiveEx { get; set; }
  134. [SugarColumn(ColumnName = "is_confirm", ColumnDataType = "tinyint(1)")]
  135. public bool IsConfirmEx { get; set; }
  136. [SugarColumn(ColumnName = "tenant_id", IsNullable = true)]
  137. public long? TenantId { get; set; }
  138. }