diff --git a/db/w3a_soc.sql b/db/w3a_soc.sql index 9f3ac08..96c5e00 100644 --- a/db/w3a_soc.sql +++ b/db/w3a_soc.sql @@ -17,13 +17,16 @@ USE w3a_soc; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; +-- ---------------------------- +-- Table structure for w3_alter_channel +-- ---------------------------- DROP TABLE IF EXISTS `w3_alter_channel`; CREATE TABLE `w3_alter_channel` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `alter_id` bigint(20) NOT NULL COMMENT 'id', `alter_source_id` bigint(20) NOT NULL COMMENT '告警渠道id', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='告警渠道表'; +) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='告警渠道表'; -- ---------------------------- -- Table structure for w3_alter_config @@ -41,7 +44,7 @@ CREATE TABLE `w3_alter_config` ( `alter_config_token` varchar(255) DEFAULT '' COMMENT '企业微信、钉钉的TOKEN', `alter_config_delete` tinyint(1) DEFAULT '1' COMMENT '逻辑删除,0:已删除,1:启用', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='告警配置表'; +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='告警配置表'; -- ---------------------------- -- Table structure for w3_alter_logs @@ -53,7 +56,7 @@ CREATE TABLE `w3_alter_logs` ( `alter_createtime` datetime NOT NULL COMMENT '创建时间', `alter_info` longtext NOT NULL COMMENT '告警内容', PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='告警记录表'; +) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COMMENT='告警记录表'; -- ---------------------------- -- Table structure for w3_alter_master @@ -69,7 +72,7 @@ CREATE TABLE `w3_alter_master` ( `alter_status` tinyint(1) DEFAULT '1' COMMENT '告警状态,0:关闭,1:开启', `alter_delete` tinyint(1) DEFAULT '1' COMMENT '告警状态,0:删除,1:启用', PRIMARY KEY (`alter_id`) -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='告警主表'; +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='告警主表'; -- ---------------------------- -- Table structure for w3_alter_paramets @@ -98,6 +101,23 @@ CREATE TABLE `w3_license` ( PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='License管理'; +-- ---------------------------- +-- Table structure for w3_secrets +-- ---------------------------- +DROP TABLE IF EXISTS `w3_secrets`; +CREATE TABLE `w3_secrets` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `secret_name` varchar(68) NOT NULL COMMENT '授权备注', + `access_key` varchar(50) NOT NULL COMMENT 'AccessKeyId', + `access_token` varchar(50) NOT NULL COMMENT 'AccessSecret', + `secret_status` tinyint(1) DEFAULT '1' COMMENT '状态,0:停用,1:启用', + `secret_delete` tinyint(1) DEFAULT '1' COMMENT '删除状态,0:删除,1:启用', + `secret_create_userid` bigint(20) NOT NULL COMMENT '归属用户的ID', + `secret_updatetime` datetime DEFAULT NULL COMMENT '更新时间', + `secret_createtime` datetime NOT NULL COMMENT '创建时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='授权秘钥管理'; + -- ---------------------------- -- Table structure for w3_statistics -- ---------------------------- @@ -136,7 +156,7 @@ CREATE TABLE `w3_vuls_circulation` ( `vul_dispose_status` tinyint(1) DEFAULT '0' COMMENT '处置状态,0:待处理,1:解决中,2:误报忽略,3:已解决,4:白名单,5:无效单,6:修改', `vul_circulation_info` varchar(255) DEFAULT '暂无' COMMENT '流转信息', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=74 DEFAULT CHARSET=utf8 COMMENT='漏洞管理.流转单'; +) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8 COMMENT='漏洞管理.流转单'; -- ---------------------------- -- Table structure for w3_vuls_service @@ -163,7 +183,7 @@ CREATE TABLE `w3_vuls_service` ( `vul_uuid` bigint(20) DEFAULT '0' COMMENT '漏洞创建人,如果是工具,默认为0', `vul_hosts` bigint(20) NOT NULL COMMENT '漏洞归属站点的ID', PRIMARY KEY (`id`,`vul_id`) -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COMMENT='漏洞管理'; +) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='漏洞管理'; -- ---------------------------- -- Table structure for w3_vuls_tags @@ -173,7 +193,7 @@ CREATE TABLE `w3_vuls_tags` ( `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', `vul_tags` varchar(30) NOT NULL COMMENT '漏洞标签', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COMMENT='漏洞管理.风险标签'; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='漏洞管理.风险标签'; -- ---------------------------- -- Table structure for w3_web_attack_rules @@ -215,7 +235,7 @@ CREATE TABLE `w3_web_attacks` ( `attack_area` varchar(10) DEFAULT '未知' COMMENT '归属地区', `attack_judge` varchar(255) DEFAULT '暂无' COMMENT '判定备注', PRIMARY KEY (`attack_id`) -) ENGINE=InnoDB AUTO_INCREMENT=5539 DEFAULT CHARSET=utf8 COMMENT='攻击日志信息'; +) ENGINE=InnoDB AUTO_INCREMENT=12265 DEFAULT CHARSET=utf8 COMMENT='攻击日志信息'; -- ---------------------------- -- Table structure for w3_web_attacks_circulation @@ -227,7 +247,7 @@ CREATE TABLE `w3_web_attacks_circulation` ( `attack_circulation_createtime` datetime NOT NULL COMMENT '流转时间', `attack_circulation_logs` varchar(255) DEFAULT '暂无' COMMENT '流转信息', PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=5549 DEFAULT CHARSET=utf8 COMMENT='攻击日志信息.流转单'; +) ENGINE=InnoDB AUTO_INCREMENT=12275 DEFAULT CHARSET=utf8 COMMENT='攻击日志信息.流转单'; -- ---------------------------- -- Table structure for w3_website