-- [ENERGY]

create type energy_param as enum ('price', 'pattern', 'effic');

-- GLOBAL   PRICE / PATTERN / EFFIC   value
create table energy_global
(
  param energy_param not null
, value numeric not null
);

-- PUMP  pumpID   PRICE / PATTERN / EFFIC  value
create table energy_pump
(
  id varchar(32) references pumps(id) not null
, param energy_param not null
, value numeric not null
);

-- DEMAND CHARGE   value
create table energy_demand_charge
(
  value numeric not null
);
