Skip to main content

Introduction to the STATIONS Table

The STATIONS table is designed to store and manage information about various production stations within a company’s manufacturing or processing setup. This table plays a crucial role in organizing and tracking different points of operation where processes are executed.

Table Structure

The STATIONS table is structured to capture essential details about each station, including its identification, status, and operational characteristics. Here’s a detailed breakdown of its columns:
Column NameData TypeConstraintsDescription
iduuidprimary keyUnique identifier for each station
company_iduuidforeign keyReferences the company that owns the station
nametextnullableName or description of the station
is_activebooleandefault trueIndicates whether the station is currently active
use_apibooleandefault falseDetermines if the station uses an API for operations
typetextdefault ‘DEDICATED’Specifies the type of station (e.g., DEDICATED, UNIVERSAL)
device_iduuidnullableIdentifier for the device associated with the station
is_lockedbooleandefault falseIndicates if the station is locked for use
locationtextnullablePhysical location of the station
created_attimestamptzTimestamp of when the station record was created

Usage and Functionality

The STATIONS table is designed to be a central point of reference for managing production stations. Here are some key points about its usage:
  1. Company Association: Each station is linked to a specific company, allowing for organization-wide station management and access control.
  2. Flexible Station Types: The type column allows for different categorizations of stations, with ‘DEDICATED’ and ‘UNIVERSAL’ being common types. This flexibility accommodates various production setups.
  3. Operational Status Tracking: The is_active and is_locked fields provide a way to manage the operational status of stations, allowing for easy activation, deactivation, or locking of stations as needed.
  4. API Integration: The use_api flag indicates whether a station is integrated with an API, potentially for automated data collection or process control.
  5. Location Management: The location field helps in organizing stations geographically, which can be crucial for large-scale operations across multiple sites.

Notes

  • Station data can be retrieved along with related information, as demonstrated in this TypeScript interface:
    interface StationWithLinksAndProcessEntries extends Station {
      station_process_links?: StationProcessLink[];
      latest_process_entries?: ProcessEntry[];
    }
    
  • The device_id field suggests that stations can be associated with specific devices, potentially for tracking or authentication purposes.
  • The combination of is_active and is_locked fields provides granular control over station availability and usage.
By leveraging the STATIONS table, the Serial application can effectively manage and organize various production points, enabling efficient process execution, monitoring, and data collection across different company setups and manufacturing environments.