CREATE TABLE STOCK_ORDER(
id int PRIMARY KEY NOT NULL,
stock_id VARCHAR(4) NOT NULL,
lot_num int NOT NULL,
type VARCHAR(10) NOT NULL,
price_type VARCHAR(10) NOT NULL,
price float NOT NULL,
status VARCHAR(10) NOT NULL,
create_time timestamp NOT NULL,
update_time timestamp NOT NULL
);
CREATE TABLE HEALTH_CHECK(
name VARCHAR(10) NOT NULL,
last_check_time timestamp NOT NULL
);
INSERT INTO HEALTH_CHECK
VALUES ('Agent', CURRENT_TIMESTAMP);
CREATE TABLE CLOSE_ORDER(
name VARCHAR(10) NOT NULL,
enable_flag int NOT NULL,
update_time timestamp NOT NULL
);
INSERT INTO CLOSE_ORDER
VALUES ('Agent', 0, CURRENT_TIMESTAMP);
CREATE TABLE ORDER_FAIL_REASON(
message TEXT NOT NULL,
update_time timestamp NOT NULL
);
CREATE TABLE ORDER_STATUS(
name VARCHAR(10) NOT NULL,
request boolean NOT NULL,
request_time timestamp NOT NULL
);
INSERT INTO ORDER_STATUS
VALUES ('Server', true, CURRENT_TIMESTAMP);
CREATE TABLE ORDER_TEXT(
name VARCHAR(10) NOT NULL,
content TEXT NOT NULL,
lock boolean NOT NULL,
upload_time timestamp NOT NULL
);
INSERT INTO ORDER_TEXT
VALUES ('Agent', '', false, CURRENT_TIMESTAMP);