AdoBarcodeCardTransaction.cs 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using SqlSugar;
  2. namespace Admin.NET.Plugin.AiDOP.MaterialWarehouse.InventoryPosting.Entity;
  3. /// <summary>
  4. /// DOP-L3 条码卡历史流水(影子, append-only)。**非旧 MissedPrintTransHist**。
  5. /// 与 <see cref="AdoBarcodeCard"/> 经 barcode_card_id 关联。旧 MissedPrintTransHist 为 append-only 流水(无自然唯一键)。
  6. /// 回灌幂等键 = (tenant_id, source_domain, source_rec_id);DOP 自生成流水 source_rec_id 为 NULL 不受约束。
  7. /// </summary>
  8. [SugarTable("ado_barcode_card_transaction", "DOP-L3条码卡历史流水(影子,非旧MissedPrintTransHist)")]
  9. [SugarIndex("uk_ado_bctrans_source", nameof(TenantId), OrderByType.Asc, nameof(SourceDomain), OrderByType.Asc, nameof(SourceRecId), OrderByType.Asc, IsUnique = true)]
  10. [SugarIndex("idx_ado_bctrans_card", nameof(TenantId), OrderByType.Asc, nameof(BarcodeCardId), OrderByType.Asc)]
  11. public class AdoBarcodeCardTransaction : AdoInvEntityBase
  12. {
  13. [SugarColumn(ColumnName = "barcode_card_id", ColumnDescription = "关联条码卡 ado_barcode_card.id", IsNullable = true)]
  14. public long? BarcodeCardId { get; set; }
  15. [SugarColumn(ColumnName = "item_num", ColumnDescription = "物料号", Length = 50, IsNullable = false, DefaultValue = "")]
  16. public string ItemNum { get; set; }
  17. [SugarColumn(ColumnName = "location", ColumnDescription = "库位", Length = 30, IsNullable = false, DefaultValue = "")]
  18. public string Location { get; set; }
  19. [SugarColumn(ColumnName = "lot_serial", ColumnDescription = "批次/序列号(空落空串)", Length = 50, IsNullable = false, DefaultValue = "")]
  20. public string LotSerial { get; set; }
  21. [SugarColumn(ColumnName = "qty", ColumnDescription = "数量", Length = 18, DecimalDigits = 5, DefaultValue = "0")]
  22. public decimal Qty { get; set; }
  23. [SugarColumn(ColumnName = "status", ColumnDescription = "状态", Length = 10, IsNullable = true)]
  24. public string Status { get; set; }
  25. [SugarColumn(ColumnName = "trans_type", ColumnDescription = "事务类型", Length = 50, IsNullable = false, DefaultValue = "")]
  26. public string TransType { get; set; }
  27. [SugarColumn(ColumnName = "remark", ColumnDescription = "备注", Length = 500, IsNullable = true)]
  28. public string Remark { get; set; }
  29. [SugarColumn(ColumnName = "posting_id", ColumnDescription = "关联过账头 ado_iqc_inventory_posting.id", IsNullable = true)]
  30. public long? PostingId { get; set; }
  31. [SugarColumn(ColumnName = "source_domain", ColumnDescription = "回灌来源Domain", Length = 20, IsNullable = true)]
  32. public string SourceDomain { get; set; }
  33. [SugarColumn(ColumnName = "source_rec_id", ColumnDescription = "回灌来源RecID", IsNullable = true)]
  34. public long? SourceRecId { get; set; }
  35. }