Meter Type
Overview
The MeterType entity represents a type of meter such as a Flow Meter, Electricity Meter, or Gas Meter. It defines the unit of measure used for usage tracking and a required default cost per unit. Multiple meter configurations may reference the same meter type, and when a configuration's cost source is FROM_METER_TYPE, the cost and cost unit of measure are inherited from this entity.
Table Structure
The following table outlines the SQL columns for the meter_types 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 |
name | String | Name of the meter type. Required and unique across all meter types (uk_meter_type_name). | Flow Meter |
usage_unit_of_measure_id | String (ULID) | References the unit of measure for usage values recorded against this meter type. Required. See unit_of_measures. | 01JAP8R5RT-3FPXQABY-7KQZT6VF |
cost | Double | Default cost per unit of measure. Required. Defaults to 0.0. | 0.38 |
cost_unit_of_measure_id | String (ULID) | References the unit of measure for the cost value. Required. See unit_of_measures. | 01JAP8RJBN-4VYZUKE1-LY2QHV8X |
Field Details
name
The name of the meter type. Required and must be unique across all meter types.
usage_unit_of_measure_id
References the UnitOfMeasure used for usage values recorded against this meter type (e.g. kWh, litres, m³). Required.
cost
The default cost per unit of measure. This value is used when a meter configuration has its cost source set to FROM_METER_TYPE. Required, and defaults to 0.0.
cost_unit_of_measure_id
References the UnitOfMeasure used for the cost value (e.g. USD). Required. This can be overridden on the meter configuration.