重构现代化 FastAPI 后端项目框架
This commit is contained in:
40
resources/sql/create/15.energy.sql
Normal file
40
resources/sql/create/15.energy.sql
Normal file
@@ -0,0 +1,40 @@
|
||||
-- [ENERGY]
|
||||
|
||||
create table energy
|
||||
(
|
||||
key text primary key
|
||||
, value text not null
|
||||
);
|
||||
|
||||
insert into energy (key, value) values
|
||||
('GLOBAL PRICE', '0')
|
||||
, ('GLOBAL PATTERN', '')
|
||||
, ('GLOBAL EFFIC', '75')
|
||||
, ('DEMAND CHARGE', '0')
|
||||
;
|
||||
|
||||
create table energy_pump_price
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, price float8 not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
|
||||
create table energy_pump_pattern
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, pattern varchar(32) references _pattern(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete pattern
|
||||
|
||||
create table energy_pump_effic
|
||||
(
|
||||
pump varchar(32) primary key references pumps(id) not null
|
||||
, effic varchar(32) references _curve(id) not null
|
||||
);
|
||||
|
||||
-- delete when delete pump
|
||||
-- delete when delete curve
|
||||
Reference in New Issue
Block a user