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
(
  id text primary key
, x numeric not null
, 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'
);
