You need to sign in or sign up before continuing.
Commit 91af05d1 by chenyu

sql commit

parent 4770a03c
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for manage_template
-- ----------------------------
DROP TABLE IF EXISTS `manage_template`;
CREATE TABLE `manage_template` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`template_id` int(10) NOT NULL COMMENT '模板id',
`name` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '爬虫模版名称',
`enable` tinyint(4) NOT NULL DEFAULT 0 COMMENT '爬虫模版状态',
`typeB` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT '爬虫模版类型C2',
`typeC` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '-1' COMMENT '爬虫模版类型C3',
`typeD` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '-1' COMMENT '爬虫模版类型C4',
`divisible` int(10) NOT NULL DEFAULT 0 COMMENT '爬虫模版是否可分裂',
`top_domain` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT '顶级域名',
`template_create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '爬虫模版创建时间',
`is_auto_match_combination` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否自动匹配组合模板',
`combination_id` int(10) NOT NULL DEFAULT 0 COMMENT '所属组合模板id',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_template_id`(`template_id`) USING BTREE COMMENT 'template唯一约束'
) ENGINE = InnoDB AUTO_INCREMENT = 9091 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for manage_template_statistics_202103
-- ----------------------------
DROP TABLE IF EXISTS `manage_template_statistics_202103`;
CREATE TABLE `manage_template_statistics_202103` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`template_id` int(10) NOT NULL COMMENT '模板id',
`time` datetime(0) NOT NULL COMMENT '时间节点',
`count` int(10) NOT NULL COMMENT '采集数据量',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `template_id_time_unique`(`template_id`, `time`) USING BTREE COMMENT '唯一约束'
) ENGINE = InnoDB AUTO_INCREMENT = 11589 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for manage_template_warning
-- ----------------------------
DROP TABLE IF EXISTS `manage_template_warning`;
CREATE TABLE `manage_template_warning` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`template_id` int(10) NOT NULL COMMENT '模板id',
`warning_level` int(10) NOT NULL DEFAULT 0 COMMENT '警告等级',
`count` int(10) NOT NULL DEFAULT 0 COMMENT '预警周期内的数据采集量',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_template_id`(`template_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46083 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for manage_template_warning_config
-- ----------------------------
DROP TABLE IF EXISTS `manage_template_warning_config`;
CREATE TABLE `manage_template_warning_config` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
`template_id` int(10) NOT NULL COMMENT '模板id',
`enable_warning` tinyint(4) NOT NULL DEFAULT 1 COMMENT '是否开启普通预警',
`period` int(10) NOT NULL DEFAULT 0 COMMENT '预警数据量统计周期 单位/hour',
`threshold` int(10) NOT NULL COMMENT '预警期间内的采集阈值',
`enable_delay` tinyint(4) NOT NULL DEFAULT 0 COMMENT '是否开启延迟预警机制',
`delay_period` int(10) NOT NULL DEFAULT 0 COMMENT '单次延迟周期 单位/hour',
`next_warn_time` datetime(0) NOT NULL COMMENT '下一次预警时间',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique_template_id`(`template_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9091 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for manage_template_warning_log
-- ----------------------------
DROP TABLE IF EXISTS `manage_template_warning_log`;
CREATE TABLE `manage_template_warning_log` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`template_id` int(10) NOT NULL COMMENT '模板id',
`template_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '模板名',
`reason` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '预警处理结果',
`handler_id` int(10) NOT NULL COMMENT '处理人',
`create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录创建时间',
`update_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '记录更新时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment