Add scada model type to scada element

This commit is contained in:
WQY\qiong
2023-04-06 00:50:44 +08:00
parent 2e4ae1bd9f
commit 02b5ef71f2
6 changed files with 141 additions and 28 deletions

View File

@@ -1,3 +1,5 @@
create type scada_model_type as enum ('JUNCTION', 'RESERVOIR', 'TANK', 'PIPE', 'PUMP', 'VALVE');
create type scada_element_status as enum ('OFF', 'ON');
create table scada_element
@@ -7,5 +9,6 @@ create table scada_element
, y numeric not null
, device_id text references scada_device(id)
, model_id varchar(32) -- add constraint in API
, model_type scada_model_type
, status scada_element_status not null default 'OFF'
);