StockRecord
object type
One StockRecord bin/lot SHARD of an InventoryItem: NOT a construct — sysId-less and FSM-less, existing only where stock has landed in a bin (zero records = everything un-binned, the small-merchant case). Carries ONLY the three LOCATABLE buckets (reserved is a claim overlay, in_transit is not physically here — both stay on the item caches); quantities are NON-NEGATIVE (a relocate refuses driving a record negative — CONFLICT/INSUFFICIENT_STOCK). The DERIVED un-binned pool = item caches minus the record sums (see verifyInventoryItem). Records persist at zero; a zeroed record does NOT block its bin (the moved-or-zeroed rule).
Fields
| Field | Type | Notes |
|---|---|---|
inventoryItemId | ID ID! | The owning InventoryItem. |
binId | ID ID! | The Bin holding this shard. |
lotCode | String | The lot identity. |
lotExpiresAt | String | The lot expiry (UTC instant) — birth-stamped; a later mismatch refuses; a record missing it is enriched by the next lotted relocate that supplies one. |
onHandQty | String String! | No further notes. |
damagedQty | String String! | No further notes. |
heldQty | String String! | No further notes. |
createdAt | String String! | No further notes. |
updatedAt | String String! | No further notes. |
revisionNum | Int Int! | No further notes. |