using System.Collections.Generic; using SqlSugar; using WmsLite.Api.Enums; namespace WmsLite.Api.Models; [SugarTable("inventory_transaction")] public class InventoryTransaction : BaseEntity { [SugarColumn(ColumnName = "inventory_id", IsNullable = false)] public long InventoryId { get; set; } [SugarColumn(ColumnName = "movement_type", IsNullable = false)] public InventoryMovementType MovementType { get; set; } [SugarColumn(ColumnName = "inventory_status", IsNullable = false)] public InventoryStatus InventoryStatus { get; set; } [SugarColumn(ColumnName = "biz_no", Length = 128, IsNullable = true)] public string? BizNo { get; set; } [SugarColumn(ColumnName = "before_qty", IsNullable = false)] public decimal BeforeQty { get; set; } [SugarColumn(ColumnName = "after_qty", IsNullable = false)] public decimal AfterQty { get; set; } [SugarColumn(ColumnName = "before_pending_inbound_qty", IsNullable = false)] public decimal BeforePendingInboundQty { get; set; } [SugarColumn(ColumnName = "after_pending_inbound_qty", IsNullable = false)] public decimal AfterPendingInboundQty { get; set; } [SugarColumn(ColumnName = "before_pending_outbound_qty", IsNullable = false)] public decimal BeforePendingOutboundQty { get; set; } [SugarColumn(ColumnName = "after_pending_outbound_qty", IsNullable = false)] public decimal AfterPendingOutboundQty { get; set; } [SugarColumn(ColumnName = "before_frozen_qty", IsNullable = false)] public decimal BeforeFrozenQty { get; set; } [SugarColumn(ColumnName = "after_frozen_qty", IsNullable = false)] public decimal AfterFrozenQty { get; set; } [SugarColumn(ColumnName = "change_qty", IsNullable = false)] public decimal ChangeQty { get; set; } [SugarColumn(ColumnName = "material_code", Length = 64, IsNullable = true)] public string? MaterialCode { get; set; } [SugarColumn(ColumnName = "container_code", Length = 64, IsNullable = true)] public string? ContainerCode { get; set; } /// 流水快照。 [SugarColumn(ColumnName = "warehouse_code", Length = 64, IsNullable = false)] public string WarehouseCode { get; set; } = string.Empty; [SugarColumn(ColumnName = "area_code", Length = 64, IsNullable = false)] public string AreaCode { get; set; } = string.Empty; [SugarColumn(ColumnName = "zone_code", Length = 64, IsNullable = false)] public string ZoneCode { get; set; } = string.Empty; [SugarColumn(ColumnName = "location_code", Length = 64, IsNullable = true)] public string? LocationCode { get; set; } [SugarColumn(ColumnName = "attrs", IsJson = true, ColumnDataType = "jsonb", IsNullable = true)] public Dictionary? Attrs { get; set; } }