Skip to main content

Inventory Lot

Overview

The InventoryLot entity represents a specific batch or lot of a material. Each lot is associated with a parent material, has a defined status, and includes details like total quantity, expiration date, and unit of measure. This entity supports tracking and management of materials in discrete quantities for production, inventory, and compliance.

Table Structure

The following table outlines the SQL columns for the inventory_lots table, providing a brief description of each, along with sample data where applicable.

ColumnTypeDescriptionExample
idString (ULID)Unique identifier for the entity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIf the entity is enabled or not.true
created_dateDateTimeDate the entity was created.2024-12-31T19:48:44Z
created_byStringPerson who created the entity.TamakiMES
modified_dateDateTimeDate the entity was modified. Value is null upon creation, and gets initially populated upon the first edit.2024-12-31T19:48:44Z
modified_byStringLast person to modify the entity. Value is null upon creation, and gets initially populated upon the first edit.TamakiMES
notesStringNotes about the entity.This entity has these extra notes
spare1StringThe first spare column that can be used for additional context on the entity.some extra context 1
spare2StringThe second spare column that can be used for additional context on the entity.some extra context 2
spare3StringThe third spare column that can be used for additional context on the entity.some extra context 3
nameStringName of the lot, unique within the context of its parent material.Batch #1001
material_idString (ULID)References the material associated with this lot. See materials.01JAP8R5RT-3FPXQABY-7KQZT6VF
statusString (Enum)Current status of the inventory lot, as defined by the LotStatus enum.OPEN
total_quantityDoubleTotal quantity of material contained in the lot.1500.0
expiration_dateDateTimeOptional field indicating the expected expiration date of the lot.2024-12-31T23:59:59Z
closed_dateDateTimeOptional field indicating the date the lot was closed.2024-01-15T12:00:00Z
unit_of_measure_idString (ULID)References the unit of measure for the lot quantity. See unit_of_measure.01JAP8RJBN-4VYZUKE1-LY2QHV8X

Field Details

material_id

References the Material entity associated with this lot, providing context about the material's characteristics and properties. See materials for details.

status

Indicates the current state of the lot, using the LotStatus enum, with possible values:

  • OPEN: Lot is in the system but not available for use.
  • AVAILABLE: Lot is available for use.
  • QA_HOLD: Lot is put on hold by QA. It is quarantined or under inspection and is not available for use.
  • EXPIRED: Lot is expired. It is not available for use.
  • SHIPPED: Lot is shipped to a customer.
  • CLOSED: Lot has been closed and is no longer active.

total_quantity

Specifies the total quantity of the material that has ever existed for this lot. This value must be zero or greater and goes up when inventory is added but does not go back down when inventory is removed.

expiration_date

Optional field for the expected expiration date of the material in the lot, primarily used for perishable or time-sensitive materials.

closed_date

Optional field for the date on which the lot was closed, useful for tracking lifecycle events of the lot.

unit_of_measure_id

References the UnitOfMeasure entity associated with the inventory lot, enabling consistent measurement standards. See unit_of_measure for details.