Transaction

Transaction Type

Represents an inventory transaction - a record of stock changes resulting from executed movements.

Fields

Field
Type
Description

id

ID!

Unique identifier of the transaction

tenantID

UUID!

Tenant identifier

createdAt

Time!

Creation timestamp

createdBy

UUID!

User identifier who created the transaction

updatedAt

Time

Last update timestamp

updatedBy

UUID!

User identifier who last updated the transaction

deletedAt

Time

Deletion timestamp

deletedBy

UUID!

User identifier who deleted the transaction

itemID

UUID!

ID of the inventory item

repositoryID

UUID!

ID of the repository

quantity

Int!

Quantity change (positive for incoming, negative for outgoing)

type

TransactionType!

Type of transaction

movementID

UUID

ID of the movement that created this transaction

referenceID

UUID

Reference to related entity (order, adjustment, etc.)

data

Map

Custom data associated with the transaction

item

InventoryItem

The inventory item

repository

Repository

The repository

movement

ItemMovement

The movement that created this transaction

Interfaces

  • Node

Transaction Types

The TransactionType enum indicates the nature of the transaction:

  • Stock increases (positive quantity)

  • Stock decreases (negative quantity)

  • Adjustments and corrections

Usage Example

Notes

  • Transactions are immutable audit records

  • Created automatically when movements are executed

  • Positive quantity = stock increase, negative = decrease

  • Enable time-travel queries for historical stock levels

Last updated

Was this helpful?