Equipment Property Value
Overview
The EquipmentPropertyValue entity stores the actual values of properties for individual equipment records. This table links properties defined in EquipmentProperty to specific Equipment records, storing the value for each assigned property. A unique constraint on equipment_id and property_id prevents duplicate property assignments for the same equipment.
Table Structure
The following table outlines the SQL columns for the equipment_property_values table, providing a brief description of each.
| Column | Type | Description | Example |
|---|---|---|---|
id | String (ULID) | Unique identifier for the entity. | 01JAP8RJBN-8ZTPXSGY-J9GSDPE1 |
enabled | Boolean | If the entity is enabled or not. | true |
created_date | DateTime | Date the entity was created. | 2024-12-31T19:48:44Z |
created_by | String | Person who created the entity. | TamakiMES |
modified_date | DateTime | Date the entity was modified. Value is null upon creation, and gets initially populated upon the first edit. | 2024-12-31T19:48:44Z |
modified_by | String | Last person to modify the entity. Value is null upon creation, and gets initially populated upon the first edit. | TamakiMES |
notes | String | Notes about the entity. | This entity has these extra notes |
spare1 | String | The first spare column that can be used for additional context on the entity. | some extra context 1 |
spare2 | String | The second spare column that can be used for additional context on the entity. | some extra context 2 |
spare3 | String | The third spare column that can be used for additional context on the entity. | some extra context 3 |
data_type | String (Enum) | Data type of the property value, corresponding to the property's data type. | Float8 |
int_value | BigInt | Integer value if the property type is Int8. | 100 |
float_value | Double | Floating-point value if the property type is Float8. | 250.0 |
string_value | String | String value if the property type is String. | Pump-101-Serial |
date_value | DateTime | Date value if the property type is DateTime. | 2024-05-01 00:00:00 |
blob_value | Blob | Binary data if the property type is ByteArray. | N/A |
equipment_id | String (ULID) | References the Equipment associated with this property value. See equipments. | 01JAP8R5RT-3FPXQABY-7KQZT6VF |
property_id | String (ULID) | References the EquipmentProperty assigned to this equipment. See equipment_properties. | 01JAP8RJBN-4VYZUKE1-LY2QHV8X |
Field Details
blob_value, date_value, float_value, int_value, string_value
These columns hold the actual property values, with the relevant field populated based on the data_type of the property. For example:
- blob_value is used if the property is a binary type.
- date_value stores date values.
- float_value holds floating-point values.
- int_value stores integer values.
- string_value holds text-based values.
equipment_id
References the Equipment associated with this property value, enabling specific property settings per equipment record.
See equipments for details.
property_id
References the EquipmentProperty assigned to the equipment, linking to a defined property and its characteristics.
See equipment_properties for details.
Relationship Structure
Each entry in the equipment_property_values table assigns a specific value to a property for an individual equipment record, allowing unique configurations across equipment. The table uses a composite unique key on equipment_id and property_id to prevent duplicate property assignments for the same equipment.