2023-05-10 21:32:22 +08:00

31 行
1.5 KiB
SQL

create table app_config
(
app_id int auto_increment comment '应用ID'
primary key,
app_name varchar(100) not null comment '应用名',
concurrent_num int default 1 not null comment '并发数',
cmd varchar(500) not null comment '命令行',
timeout bigint default 840 not null comment '任务超时时间(单位:分钟)',
local_path varchar(100) default '/data' not null comment '放置文件的路径',
email_template json not null comment '邮件格式(json格式:{"subject":"**","success":"**"})',
constraint app_config_app_name_uniq
unique (app_name)
)
comment '应用配置信息';
create table job
(
job_id int auto_increment comment 'jobId'
primary key,
app_id int not null comment '应用ID',
param varchar(10000) null comment '请求参数',
mail varchar(500) null comment '联系邮箱',
result text null comment '运行结果',
status tinyint null comment '任务状态。0为待运行,1为正在运行,2为运行成功,-1为运行失败',
request_time datetime null comment '请求时间',
create_time datetime null comment '创建时间',
complete_time datetime null comment '完成时间',
type int null comment '请求类型'
);