-- [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
);
