Skip to main content

Equipment Maintenance Plan

Overview

The EquipmentMaintenancePlan entity defines maintenance schedules and triggers for specific pieces of equipment. These plans specify when maintenance should occur, the triggering conditions, and the department responsible. This enables proactive and automated maintenance scheduling based on predefined criteria.

Table Structure

The following table outlines the SQL columns for the equipment_maintenance_plans 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
descriptionStringDetailed description of the maintenance plan.Quarterly inspection of forklift
trigger_typeString (Enum)The type of trigger that initiates maintenance. Possible values: MANUAL, EXPRESSION, CRONTAB, as defined by the EquipmentTriggerType enum.CRONTAB
trigger_expressionStringAn optional expression that defines the trigger condition (e.g., cron syntax).0 0 * * 1
equipment_idString (ULID)References the specific equipment this maintenance plan applies to. See equipment.01JAP8R5RT-3FPXQABY-7KQZT6VF
department_idString (ULID)References the department responsible for carrying out the maintenance. See personnel_departments.01JAP8RJBN-4VYZUKE1-LY2QHV8X

Field Details

description

An optional field for a longer description of the maintenance plan, with a character limit of 2048. This field provides context on the type and purpose of the maintenance.

trigger_type

Defines the trigger type for initiating a maintenance order, based on the EquipmentTriggerType enum. The possible values are:

  • MANUAL: Maintenance is manually initiated.
  • EXPRESSION: Triggered by an expression, such as a PLC condition.
  • CRONTAB: Triggered by a cron-like schedule, allowing for regular, automated maintenance.

trigger_expression

An optional field that stores the condition or schedule for maintenance, typically used with EXPRESSION or CRONTAB trigger types.

equipment_id

References the specific Equipment item this maintenance plan applies to, enabling targeted scheduling for individual pieces of equipment. See equipment for details.

department_id

References the PersonnelDepartment responsible for executing the maintenance plan, ensuring accountability and resource allocation. See personnel_departments for details.