-- [energy]

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

-- global   price / pattern / effic   value
create table tj.energy_global
(
  param tj.energy_param not null
, value numeric not null
);

-- pump  pumpid   price / pattern / effic  value
create table tj.energy_pump
(
  id varchar(32) references tj.pumps(id) not null
, param tj.energy_param not null
, value numeric not null
);

-- demand charge   value
create table tj.energy_demand_charge
(
  value numeric not null
);
