一、模型表
表结构设计如下:
DROP TABLE IF EXISTS t_mode_table;
CREATE TABLE t_mode_table(
id int8 NOT NULL,
db_name VARCHAR(32) NOT NULL,
table_name VARCHAR(32) NOT NULL,
table_comment VARCHAR(32) NOT NULL,
table_ddl VARCHAR(32),
subject_id VARCHAR(32),
table_description VARCHAR(32),
state int2 DEFAULT 0 NOT NULL,
del_flag int2 DEFAULT 0 NOT NULL,
tenant_id int8 NOT NULL,
group_id int8,
create_by int8 NOT NULL,
create_time timestamp DEFAULT now() NOT NULL,
update_by int8 NOT NULL,
update_time timestamp DEFAULT now() NOT NULL,
PRIMARY KEY (id)
);
COMMENT ON TABLE t_mode_table IS '模型表';
COMMENT ON COLUMN t_mode_table.id IS '主键ID';
COMMENT ON COLUMN t_mode_table.db_name IS '库名';
COMMENT ON COLUMN t_mode_table.table_name IS '表名';
COMMENT ON COLUMN t_mode_table.table_comment IS '表中文名';
COMMENT ON COLUMN t_mode_table.table_ddl IS 'DDL';
COMMENT ON COLUMN t_mode_table.subject_id IS '主题域ID';
COMMENT ON COLUMN t_mode_table.table_description IS '表描述';
COMMENT ON COLUMN t_mode_table.state IS '0启用,1禁用';
COMMENT ON COLUMN t_mode_table.del_flag IS '逻辑删除标识1-删除,0-未删除';
COMMENT ON COLUMN t_mode_table.tenant_id IS '租户ID';
COMMENT ON COLUMN t_mode_table.group_id IS '组ID';
COMMENT ON COLUMN t_mode_table.create_by IS '创建人';
COMMENT ON COLUMN t_mode_table.create_time IS '创建时间';
COMMENT ON COLUMN t_mode_table.update_by IS '更新人';
COMMENT ON COLUMN t_mode_table.update_time IS '更新时间';
ALTER TABLE t_mode_table COMMENT '模型表';
接口1、