update component

This commit is contained in:
zhuxu 2024-12-18 17:10:27 +08:00
parent e9ecb9da07
commit 8428c7048b
1 changed files with 3 additions and 2 deletions

View File

@ -244,13 +244,14 @@ CREATE TABLE component (
--position JSONB NOT NULL DEFAULT '{}', -- {"x":0,"y":0},是否放在数据中 --position JSONB NOT NULL DEFAULT '{}', -- {"x":0,"y":0},是否放在数据中
context JSONB NOT NULL DEFAULT '{}', -- 数据格式暂定jsonb需要存放什么样的UI侧的数据 context JSONB NOT NULL DEFAULT '{}', -- 数据格式暂定jsonb需要存放什么样的UI侧的数据
station_id INTEGER NOT NULL DEFAULT -1, grid VARCHAR(64) NOT NULL DEFAULT '', -- 仅用于展示
zone VARCHAR(64) NOT NULL DEFAULT '', -- 仅用于展示
station VARCHAR(64) NOT NULL DEFAULT '', -- 仅用于展示
page_id INTEGER NOT NULL DEFAULT -1, -- 组态图id page_id INTEGER NOT NULL DEFAULT -1, -- 组态图id
-- --
op INTEGER NOT NULL DEFAULT -1, op INTEGER NOT NULL DEFAULT -1,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY(station_id) REFERENCES station(id),
FOREIGN KEY(page_id) REFERENCES page(id) FOREIGN KEY(page_id) REFERENCES page(id)
); );
COMMENT ON TABLE component IS '设备信息'; COMMENT ON TABLE component IS '设备信息';