提交 | 用户 | 时间
|
e7c126
|
1 |
|
H |
2 |
CREATE TABLE IF NOT EXISTS "infra_config" ( |
|
3 |
"id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY COMMENT '编号', |
|
4 |
"category" varchar(50) NOT NULL, |
|
5 |
"type" tinyint NOT NULL, |
|
6 |
"name" varchar(100) NOT NULL DEFAULT '' COMMENT '名字', |
|
7 |
"config_key" varchar(100) NOT NULL DEFAULT '', |
|
8 |
"value" varchar(500) NOT NULL DEFAULT '', |
|
9 |
"visible" bit NOT NULL, |
|
10 |
"remark" varchar(500) DEFAULT NULL, |
|
11 |
"creator" varchar(64) DEFAULT '', |
|
12 |
"create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
13 |
"updater" varchar(64) DEFAULT '', |
|
14 |
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
15 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
16 |
PRIMARY KEY ("id") |
|
17 |
) COMMENT '参数配置表'; |
|
18 |
|
|
19 |
CREATE TABLE IF NOT EXISTS "infra_file_config" ( |
|
20 |
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, |
|
21 |
"name" varchar(63) NOT NULL, |
|
22 |
"storage" tinyint NOT NULL, |
|
23 |
"remark" varchar(255), |
|
24 |
"master" bit(1) NOT NULL, |
|
25 |
"config" varchar(4096) NOT NULL, |
|
26 |
"creator" varchar(64) DEFAULT '', |
|
27 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
28 |
"updater" varchar(64) DEFAULT '', |
|
29 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|
30 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
31 |
PRIMARY KEY ("id") |
|
32 |
) COMMENT '文件配置表'; |
|
33 |
|
|
34 |
CREATE TABLE IF NOT EXISTS "infra_file" ( |
|
35 |
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, |
|
36 |
"config_id" bigint NOT NULL, |
|
37 |
"name" varchar(256), |
|
38 |
"path" varchar(512), |
|
39 |
"url" varchar(1024), |
|
40 |
"type" varchar(63) DEFAULT NULL, |
|
41 |
"size" bigint NOT NULL, |
|
42 |
"creator" varchar(64) DEFAULT '', |
|
43 |
"create_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
44 |
"updater" varchar(64) DEFAULT '', |
|
45 |
"update_time" timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
46 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
47 |
"tenant_id" bigint not null default '0', |
|
48 |
PRIMARY KEY ("id") |
|
49 |
) COMMENT '文件表'; |
|
50 |
|
|
51 |
CREATE TABLE IF NOT EXISTS "infra_job" ( |
|
52 |
"id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY COMMENT '任务编号', |
|
53 |
"name" varchar(32) NOT NULL COMMENT '任务名称', |
|
54 |
"status" tinyint(4) NOT NULL COMMENT '任务状态', |
|
55 |
"handler_name" varchar(64) NOT NULL COMMENT '处理器的名字', |
|
56 |
"handler_param" varchar(255) DEFAULT NULL COMMENT '处理器的参数', |
|
57 |
"cron_expression" varchar(32) NOT NULL COMMENT 'CRON 表达式', |
|
58 |
"retry_count" int(11) NOT NULL DEFAULT '0' COMMENT '重试次数', |
|
59 |
"retry_interval" int(11) NOT NULL DEFAULT '0' COMMENT '重试间隔', |
|
60 |
"monitor_timeout" int(11) NOT NULL DEFAULT '0' COMMENT '监控超时时间', |
|
61 |
"creator" varchar(64) DEFAULT '' COMMENT '创建者', |
|
62 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|
63 |
"updater" varchar(64) DEFAULT '' COMMENT '更新者', |
|
64 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
|
65 |
"deleted" bit NOT NULL DEFAULT FALSE COMMENT '是否删除', |
|
66 |
PRIMARY KEY ("id") |
|
67 |
) COMMENT='定时任务表'; |
|
68 |
|
|
69 |
CREATE TABLE IF NOT EXISTS "infra_job_log" ( |
|
70 |
"id" bigint(20) NOT NULL GENERATED BY DEFAULT AS IDENTITY COMMENT '日志编号', |
|
71 |
"job_id" bigint(20) NOT NULL COMMENT '任务编号', |
|
72 |
"handler_name" varchar(64) NOT NULL COMMENT '处理器的名字', |
|
73 |
"handler_param" varchar(255) DEFAULT NULL COMMENT '处理器的参数', |
|
74 |
"execute_index" tinyint(4) NOT NULL DEFAULT '1' COMMENT '第几次执行', |
|
75 |
"begin_time" datetime NOT NULL COMMENT '开始执行时间', |
|
76 |
"end_time" datetime DEFAULT NULL COMMENT '结束执行时间', |
|
77 |
"duration" int(11) DEFAULT NULL COMMENT '执行时长', |
|
78 |
"status" tinyint(4) NOT NULL COMMENT '任务状态', |
|
79 |
"result" varchar(4000) DEFAULT '' COMMENT '结果数据', |
|
80 |
"creator" varchar(64) DEFAULT '' COMMENT '创建者', |
|
81 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', |
|
82 |
"updater" varchar(64) DEFAULT '' COMMENT '更新者', |
|
83 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
|
84 |
"deleted" bit(1) NOT NULL DEFAULT FALSE COMMENT '是否删除', |
|
85 |
PRIMARY KEY ("id") |
|
86 |
)COMMENT='定时任务日志表'; |
|
87 |
|
|
88 |
CREATE TABLE IF NOT EXISTS "infra_api_access_log" ( |
|
89 |
"id" bigint not null GENERATED BY DEFAULT AS IDENTITY, |
|
90 |
"trace_id" varchar(64) not null default '', |
|
91 |
"user_id" bigint not null default '0', |
|
92 |
"user_type" tinyint not null default '0', |
|
93 |
"application_name" varchar(50) not null, |
|
94 |
"request_method" varchar(16) not null default '', |
|
95 |
"request_url" varchar(255) not null default '', |
|
96 |
"request_params" varchar(8000) not null default '', |
|
97 |
"response_body" varchar(8000) not null default '', |
|
98 |
"user_ip" varchar(50) not null, |
|
99 |
"user_agent" varchar(512) not null, |
|
100 |
`operate_module` varchar(50) NOT NULL, |
|
101 |
`operate_name` varchar(50) NOT NULL, |
|
102 |
`operate_type` bigint(4) NOT NULL DEFAULT '0', |
|
103 |
"begin_time" timestamp not null, |
|
104 |
"end_time" timestamp not null, |
|
105 |
"duration" integer not null, |
|
106 |
"result_code" integer not null default '0', |
|
107 |
"result_msg" varchar(512) default '', |
|
108 |
"creator" varchar(64) default '', |
|
109 |
"create_time" timestamp not null default current_timestamp, |
|
110 |
"updater" varchar(64) default '', |
|
111 |
"update_time" timestamp not null default current_timestamp, |
|
112 |
"deleted" bit not null default false, |
|
113 |
"tenant_id" bigint not null default '0', |
|
114 |
primary key ("id") |
|
115 |
) COMMENT 'API 访问日志表'; |
|
116 |
|
|
117 |
CREATE TABLE IF NOT EXISTS "infra_api_error_log" ( |
|
118 |
"id" bigint not null GENERATED BY DEFAULT AS IDENTITY, |
|
119 |
"trace_id" varchar(64) not null, |
|
120 |
"user_id" bigint not null default '0', |
|
121 |
"user_type" tinyint not null default '0', |
|
122 |
"application_name" varchar(50) not null, |
|
123 |
"request_method" varchar(16) not null, |
|
124 |
"request_url" varchar(255) not null, |
|
125 |
"request_params" varchar(8000) not null, |
|
126 |
"user_ip" varchar(50) not null, |
|
127 |
"user_agent" varchar(512) not null, |
|
128 |
"exception_time" timestamp not null, |
|
129 |
"exception_name" varchar(128) not null default '', |
|
130 |
"exception_message" clob not null, |
|
131 |
"exception_root_cause_message" clob not null, |
|
132 |
"exception_stack_trace" clob not null, |
|
133 |
"exception_class_name" varchar(512) not null, |
|
134 |
"exception_file_name" varchar(512) not null, |
|
135 |
"exception_method_name" varchar(512) not null, |
|
136 |
"exception_line_number" integer not null, |
|
137 |
"process_status" tinyint not null, |
|
138 |
"process_time" timestamp default null, |
|
139 |
"process_user_id" bigint default '0', |
|
140 |
"creator" varchar(64) default '', |
|
141 |
"create_time" timestamp not null default current_timestamp, |
|
142 |
"updater" varchar(64) default '', |
|
143 |
"update_time" timestamp not null default current_timestamp, |
|
144 |
"deleted" bit not null default false, |
|
145 |
"tenant_id" bigint not null default '0', |
|
146 |
primary key ("id") |
|
147 |
) COMMENT '系统异常日志'; |
|
148 |
|
|
149 |
CREATE TABLE IF NOT EXISTS "infra_data_source_config" ( |
|
150 |
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, |
|
151 |
"name" varchar(100) NOT NULL, |
|
152 |
"url" varchar(1024) NOT NULL, |
|
153 |
"username" varchar(255) NOT NULL, |
|
154 |
"password" varchar(255) NOT NULL, |
|
155 |
"creator" varchar(64) DEFAULT '', |
|
156 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
157 |
"updater" varchar(64) DEFAULT '', |
|
158 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|
159 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
160 |
PRIMARY KEY ("id") |
|
161 |
) COMMENT '数据源配置表'; |
|
162 |
|
|
163 |
CREATE TABLE IF NOT EXISTS "infra_codegen_table" ( |
|
164 |
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, |
|
165 |
"data_source_config_id" bigint not null, |
|
166 |
"scene" tinyint not null DEFAULT 1, |
|
167 |
"table_name" varchar(200) NOT NULL, |
|
168 |
"table_comment" varchar(500) NOT NULL, |
|
169 |
"remark" varchar(500) NOT NULL, |
|
170 |
"module_name" varchar(30) NOT NULL, |
|
171 |
"business_name" varchar(30) NOT NULL, |
|
172 |
"class_name" varchar(100) NOT NULL, |
|
173 |
"class_comment" varchar(50) NOT NULL, |
|
174 |
"author" varchar(50) NOT NULL, |
|
175 |
"template_type" tinyint not null DEFAULT 1, |
|
176 |
"front_type" tinyint not null, |
|
177 |
"parent_menu_id" bigint not null, |
|
178 |
"master_table_id" bigint not null, |
|
179 |
"sub_join_column_id" bigint not null, |
|
180 |
"sub_join_many" bit not null, |
|
181 |
"tree_parent_column_id" bigint not null, |
|
182 |
"tree_name_column_id" bigint not null, |
|
183 |
"creator" varchar(64) DEFAULT '', |
|
184 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
185 |
"updater" varchar(64) DEFAULT '', |
|
186 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|
187 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
188 |
PRIMARY KEY ("id") |
|
189 |
) COMMENT '代码生成表定义表'; |
|
190 |
|
|
191 |
CREATE TABLE IF NOT EXISTS "infra_codegen_column" ( |
|
192 |
"id" bigint NOT NULL GENERATED BY DEFAULT AS IDENTITY, |
|
193 |
"table_id" bigint not null, |
|
194 |
"column_name" varchar(200) NOT NULL, |
|
195 |
"data_type" varchar(100) NOT NULL, |
|
196 |
"column_comment" varchar(500) NOT NULL, |
|
197 |
"nullable" tinyint not null, |
|
198 |
"primary_key" tinyint not null, |
|
199 |
"ordinal_position" int not null, |
|
200 |
"java_type" varchar(32) NOT NULL, |
|
201 |
"java_field" varchar(64) NOT NULL, |
|
202 |
"dict_type" varchar(200) NOT NULL, |
|
203 |
"example" varchar(64) NOT NULL, |
|
204 |
"create_operation" bit not null, |
|
205 |
"update_operation" bit not null, |
|
206 |
"list_operation" bit not null, |
|
207 |
"list_operation_condition" varchar(32) not null, |
|
208 |
"list_operation_result" bit not null, |
|
209 |
"html_type" varchar(32) NOT NULL, |
|
210 |
"creator" varchar(64) DEFAULT '', |
|
211 |
"create_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|
212 |
"updater" varchar(64) DEFAULT '', |
|
213 |
"update_time" datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, |
|
214 |
"deleted" bit NOT NULL DEFAULT FALSE, |
|
215 |
PRIMARY KEY ("id") |
|
216 |
) COMMENT '代码生成表字段定义表'; |