Skip to main content

Inventory Lot Record

Overview

The InventoryLotRecord entity represents an instance of an inventory operation that has been performed within the MES system. Key attributes include status, start and end dates, type, material, and associated operation and production order details. These fields enable tracking of the execution and completion of specific operations, providing a record of when and where each inventory operation took place.

Table Structure

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

ColumnTypeDescriptionExample
idString (ULID)Unique identifier for the entity, inherited from the BaseEntity.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
enabledBooleanIndicates whether the entity is enabled, inherited from the BaseEntity.true
created_dateDateTimeDate the entity was created, inherited from the BaseEntity.2024-12-31T19:48:44Z
created_byStringPerson who created the entity, inherited from the BaseEntity.TamakiMES
modified_dateDateTimeDate the entity was last modified, inherited from the BaseEntity.2024-12-31T19:48:44Z
modified_byStringLast person to modify the entity, inherited from the BaseEntity.TamakiMES
lot_record_typeString (Enum)Specifies the type of change for the record (e.g., CONSUME, PRODUCE, SPLIT, MERGE).CONSUME
inventory_lot_idString (FK)References the primary InventoryLot for the record.01JAP8RJBN-7KQZT6VF-Q5VUZYPW
secondary_inventory_lot_idString (FK)References the secondary InventoryLot for operations like split or merge.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
operation_record_idString (FK)References the parent OperationRecord associated with this lot record.01JAP8R5RT-3FPXQABY-7KQZT6VF
production_order_idString (FK)References the associated ProductionOrder.01JAP8RJBN-7KQZT6VF-Q5VUZYPW
material_reason_code_idString (FK)References the MaterialReasonCode for additional context.01JAP8RJBN-4VYZUKE1-LY2QHV8X
source_location_idString (FK)References the source Location of the lot/inventory being operated.01JAP8RJBN-7KQZT6VF-Q5VUZYPW
destination_location_idString (FK)References the destination Location of the lot/inventory being operated.01JAP8RJBN-8ZTPXSGY-J9GSDPE1
lot_statusString (Enum)Represents the status of the lot (e.g., ACTIVE, INACTIVE, SCRAPPED).ACTIVE
quantityDoubleSpecifies the quantity of units produced, consumed, scrapped, etc.100.0
start_dateDateTimeTimestamp marking the beginning of the lot change.2024-05-10T08:00:00Z
end_dateDateTimeTimestamp marking the end of the lot change.2024-05-10T10:00:00Z
statusString (Enum)Represents the status of the record (e.g., RUNNING, COMPLETED, FAULTED).COMPLETED
schedule_shift_record_idString (FK)References the ScheduleShiftRecord in which the inventory lot record occurred.01JAP8RJBN-4VYZUKE1-LY2QHV8X

Field Details

lot_record_type

Specifies the type of change for the record, as defined by the LotRecordType enum, with possible values:

  • CONSUME: The lot is being consumed.
  • PRODUCE: The lot is being produced.
  • SPLIT: The lot is being split into multiple lots.
  • MERGE: Multiple lots are being merged into one.

inventory_lot_id

References the primary InventoryLot associated with the record. This is required for operations like consumption, production, split, or merge.

secondary_inventory_lot_id

References the secondary InventoryLot used in operations like split or merge.

operation_record_id

References the parent OperationRecord associated with this lot record.

production_order_id

References the associated ProductionOrder for the inventory operation.

material_reason_code_id

References the MaterialReasonCode providing additional context for the operation.

source_location_id

References the source Location of the lot or inventory being operated on.

destination_location_id

References the destination Location of the lot or inventory being operated on.

lot_status

Represents the resulting status of the lot, as defined by the LotStatus enum, with possible values:

  • ACTIVE: The lot is active and available for inventory operations.
  • INACTIVE: The lot is inactive and not available for inventory operations.
  • SCRAPPED: The lot has been scrapped.

quantity

Specifies the quantity of units involved in the inventory operation (e.g., produced, consumed, scrapped).

start_date

The timestamp marking the beginning of the Inventory change. Defaults to the record creation time.

end_date

The timestamp marking the end of the Inventory change. A null value indicates the inventory operation is still ongoing.

status

Represents the current status of the record, as defined by the Status enum, with possible values:

  • RUNNING: The inventory operation is currently in progress.
  • COMPLETED: The inventory operation has successfully completed.
  • FAULTED: The inventory operation encountered an error.

schedule_shift_record_id

References the ScheduleShiftRecord in which the inventory lot record occurred.