create type _node_type as enum ('junction', 'reservoir', 'tank');

create type _link_type as enum ('pipe', 'pump', 'valve');

create type _curve_type as enum ('PUMP', 'EFFICIENCY', 'VOLUME', 'HEADLOSS');

create table _node
(
  id varchar(32) primary key
, type _node_type  not null
);

create table _link
(
  id varchar(32) primary key
, type _link_type  not null
);

create table _curve
(
  id varchar(32) primary key
, type _curve_type not null
);

create table _pattern
(
  id varchar(32) primary key
);
