重构现代化 FastAPI 后端项目框架

This commit is contained in:
2026-01-21 16:50:57 +08:00
parent 9e06e68a15
commit c56f2fd1db
352 changed files with 176 additions and 70 deletions

View File

@@ -0,0 +1,15 @@
drop table if exists _region;
drop table if exists _pattern;
drop table if exists _curve;
drop table if exists _link;
drop table if exists _node;
drop type if exists _curve_type;
drop type if exists _link_type;
drop type if exists _node_type;

View File

@@ -0,0 +1,3 @@
-- [TITLE]
drop table if exists title;

View File

@@ -0,0 +1,5 @@
-- [STATUS]
drop table if exists status;
drop type if exists link_status;

View File

@@ -0,0 +1,3 @@
-- [PATTERNS]
drop table if exists patterns;

View File

@@ -0,0 +1,3 @@
-- [CURVES]
drop table if exists curves;

View File

@@ -0,0 +1,3 @@
-- [CONTROLS]
drop table if exists controls;

View File

@@ -0,0 +1,3 @@
-- [RULES]
drop table if exists rules;

View File

@@ -0,0 +1,9 @@
-- [ENERGY]
drop table if exists energy_pump_effic;
drop table if exists energy_pump_pattern;
drop table if exists energy_pump_price;
drop table if exists energy;

View File

@@ -0,0 +1,3 @@
-- [EMITTERS]
drop table if exists emitters;

View File

@@ -0,0 +1,3 @@
-- [QUALITY]
drop table if exists quality;

View File

@@ -0,0 +1,5 @@
-- [SOURCES]
drop table if exists sources;
drop type if exists sources_type;

View File

@@ -0,0 +1,9 @@
-- [REACTIONS]
drop table if exists reactions_tank;
drop table if exists reactions_pipe_wall;
drop table if exists reactions_pipe_bulk;
drop table if exists reactions;

View File

@@ -0,0 +1,3 @@
-- [JUNCTIONS]
drop table if exists junctions;

View File

@@ -0,0 +1,5 @@
-- [MIXING]
drop table if exists mixing;
drop type if exists mixing_model;

View File

@@ -0,0 +1,3 @@
-- [TIMES]
drop table if exists times;

View File

@@ -0,0 +1,3 @@
-- [REPORT]
drop table if exists report;

View File

@@ -0,0 +1,5 @@
-- [OPTIONS]
drop table if exists options_v3;
drop table if exists options;

View File

@@ -0,0 +1,5 @@
-- [COORDINATES]
drop index if exists coordinates_gist;
drop table if exists coordinates;

View File

@@ -0,0 +1,3 @@
-- [VERTICES]
drop table if exists vertices;

View File

@@ -0,0 +1,3 @@
-- [LABELS]
drop table if exists labels;

View File

@@ -0,0 +1,3 @@
-- [BACKDROP]
drop table if exists backdrop;

View File

@@ -0,0 +1 @@
-- [END]

View File

@@ -0,0 +1,3 @@
drop table if exists scada_device;
drop type if exists scada_device_type;

View File

@@ -0,0 +1,3 @@
-- [RESERVOIRS]
drop table if exists reservoirs;

View File

@@ -0,0 +1 @@
drop table if exists scada_device_data;

View File

@@ -0,0 +1,5 @@
drop table if exists scada_element;
drop type if exists scada_element_status;
drop type if exists scada_model_type;

View File

@@ -0,0 +1,17 @@
drop table if exists temp_vd_topology;
drop table if exists temp_link_2;
drop table if exists temp_link_1;
drop table if exists temp_node;
drop index if exists temp_region_gist;
drop table if exists temp_region;
drop index if exists region_gist;
drop table if exists region;
drop type if exists region_type;

View File

@@ -0,0 +1 @@
drop table if exists region_dma;

View File

@@ -0,0 +1 @@
drop table if exists region_sa;

View File

@@ -0,0 +1 @@
drop table if exists region_vd;

View File

@@ -0,0 +1 @@
drop table if exists region_wda;

View File

@@ -0,0 +1,3 @@
-- WMH
-- 2025/01/12
drop table if exists history_patterns_flows;

View File

@@ -0,0 +1,3 @@
-- WMH
-- 2025/01/12
drop table if exists scada_info;

View File

@@ -0,0 +1,5 @@
-- 王名豪
-- 2025/03/23
-- 删除user这张表
drop table if exists users;

View File

@@ -0,0 +1,5 @@
-- [TANKS]
drop table if exists tanks;
drop type if exists tanks_overflow;

View File

@@ -0,0 +1,6 @@
-- [SCHEME_LIST]
-- 王名豪
-- 2025/03/23
-- 删除scheme_list这张表
drop table if exists scheme_list;

View File

@@ -0,0 +1,6 @@
-- [PIPE_RISK_PROBABILITY]
-- 王名豪
-- 2025/04/16
-- 删除pipe_risk_probability这张表
drop table if exists pipe_risk_probability;

View File

@@ -0,0 +1,6 @@
-- [SENSOR_PLACEMENT]
-- 王名豪
-- 2025/04/18
-- 删除sensor_placement这张表
drop table if exists sensor_placement;

View File

@@ -0,0 +1,6 @@
-- [BURST_LOCATE_RESULT]
-- 王名豪
-- 2025/04/19
-- 删除burst_locate_result这张表
drop table if exists burst_locate_result;

View File

@@ -0,0 +1,5 @@
-- [PIPES]
drop table if exists pipes;
drop type if exists pipes_status;

View File

@@ -0,0 +1,3 @@
-- [PUMPS]
drop table if exists pumps;

View File

@@ -0,0 +1,5 @@
-- [VALVES]
drop table if exists valves;
drop type if exists valves_type;

View File

@@ -0,0 +1,5 @@
-- [TAGS]
drop table if exists tags_link;
drop table if exists tags_node;

View File

@@ -0,0 +1,3 @@
-- [DEMANDS]
drop table if exists demands;

View File

@@ -0,0 +1 @@
drop table if exists extension_data;

View File

@@ -0,0 +1,13 @@
drop table if exists operation_table;
drop type if exists operation_table_option;
drop table if exists batch_operation;
drop table if exists restore_operation;
drop table if exists snapshot_operation;
drop table if exists current_operation;
drop table if exists operation;