feat: 完成 issue #4 数据总线 + 时序库 模板化封装

This commit is contained in:
2026-08-04 16:58:06 +08:00
parent 1fb1d278d5
commit 4c3a9fdbe6
10 changed files with 789 additions and 3 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ TABLE_COLUMNS: dict = {
"id BIGSERIAL PRIMARY KEY",
"template VARCHAR(64) NOT NULL UNIQUE",
"version VARCHAR(32) NOT NULL DEFAULT '0.1.0'",
"config JSONB NOT NULL DEFAULT '{}'::jsonb",
"config JSONB NOT NULL DEFAULT '{{}}'::jsonb", # format() 转义 {}
"status VARCHAR(16) NOT NULL DEFAULT 'draft'",
"created_at TIMESTAMPTZ NOT NULL DEFAULT now()",
],
@@ -34,7 +34,7 @@ TABLE_COLUMNS: dict = {
"model_id VARCHAR(128) NOT NULL UNIQUE",
"template VARCHAR(64) REFERENCES {schema}.templates(template) ON DELETE CASCADE",
"algorithm VARCHAR(32) NOT NULL DEFAULT 'xgboost'",
"hyperparams JSONB NOT NULL DEFAULT '{}'::jsonb",
"hyperparams JSONB NOT NULL DEFAULT '{{}}'::jsonb", # format() 转义 {}
"version VARCHAR(32) NOT NULL DEFAULT '0.1.0'",
"status VARCHAR(16) NOT NULL DEFAULT 'staging'",
"created_at TIMESTAMPTZ NOT NULL DEFAULT now()",