parent
a55c519c35
commit
b47ae82bf2
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
Navicat Premium Data Transfer
|
||||
|
||||
Source Server : 测试环境MySQL服务器
|
||||
Source Server Type : MySQL
|
||||
Source Server Version : 50731
|
||||
Source Host : 10.88.77.65:33061
|
||||
Source Schema : ci_dispose_v2
|
||||
|
||||
Target Server Type : MySQL
|
||||
Target Server Version : 50731
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 11/09/2020 00:46:15
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
SET FOREIGN_KEY_CHECKS = 0;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for device_task
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `device_task`;
|
||||
CREATE TABLE `device_task` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '任务信息唯一标识符',
|
||||
`taskId` int(11) UNSIGNED NOT NULL COMMENT '处置任务唯一标识符',
|
||||
`deviceId` int(10) UNSIGNED NOT NULL COMMENT '处置设备唯一标识符',
|
||||
`beginTime` timestamp(0) NULL DEFAULT NULL COMMENT '任务开始时间',
|
||||
`endTime` timestamp(0) NULL DEFAULT NULL COMMENT '任务结束时间',
|
||||
`taskAttackType` bigint(255) UNSIGNED NOT NULL DEFAULT 0 COMMENT '需要处置的攻击类型',
|
||||
`execAttackTypeIn` bigint(255) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已经执行处置的攻击类型(Input)',
|
||||
`attackTypeStatusIn` bigint(255) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行的攻击类型状态(Input)',
|
||||
`execAttackTypeOut` bigint(255) UNSIGNED NOT NULL DEFAULT 0 COMMENT '已经执行处置的攻击类型(Output)',
|
||||
`attackTypeStatusOut` bigint(255) UNSIGNED NOT NULL DEFAULT 0 COMMENT '执行的攻击类型状态(Input)',
|
||||
`externId` int(11) NULL DEFAULT NULL COMMENT '扩展任务ID',
|
||||
`errRetry` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '调用失败重试次数',
|
||||
`status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '任务状态',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `task_info_ibfk_1`(`taskId`) USING BTREE,
|
||||
INDEX `task_info_ibfk_2`(`deviceId`) USING BTREE,
|
||||
CONSTRAINT `device_task_ibfk_1` FOREIGN KEY (`taskId`) REFERENCES `dispose_task` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
|
||||
CONSTRAINT `device_task_ibfk_2` FOREIGN KEY (`deviceId`) REFERENCES `dispose_device` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of device_task
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for dispose_capacity
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `dispose_capacity`;
|
||||
CREATE TABLE `dispose_capacity` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '设备处置能力唯一标识符',
|
||||
`deviceId` int(11) UNSIGNED NOT NULL COMMENT '设备ID',
|
||||
`capacityType` int(8) NOT NULL COMMENT '处置能力:\r\n0:清洗\r\n1:高防 \r\n2:路由黑洞 \r\n3:检测\r\n4:WAF封堵\r\n',
|
||||
`objectType` int(8) NOT NULL COMMENT '处置对象类型:\r\n0:IP\r\n1:域名 \r\n2:URL',
|
||||
`ipType` int(8) NOT NULL DEFAULT 3 COMMENT 'IP 地址类型:\r\n1 << 0:支持IPV4\r\n1 << 1:支持IPV6',
|
||||
`protectIp` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '该处置能力能够处置的IP',
|
||||
`reserveNetflow` int(11) NULL DEFAULT NULL COMMENT '清洗能力储备流量值,单位(G)',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `id`(`deviceId`) USING BTREE,
|
||||
CONSTRAINT `dispose_capacity_ibfk_1` FOREIGN KEY (`deviceId`) REFERENCES `dispose_device` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of dispose_capacity
|
||||
-- ----------------------------
|
||||
INSERT INTO `dispose_capacity` VALUES (1, 1, 0, 1, 3, '0.0.0.0', 10);
|
||||
INSERT INTO `dispose_capacity` VALUES (2, 1, 1, 7, 3, '', NULL);
|
||||
INSERT INTO `dispose_capacity` VALUES (3, 1, 2, 7, 3, '0.0.0.0', NULL);
|
||||
INSERT INTO `dispose_capacity` VALUES (4, 1, 3, 1, 3, '0.0.0.0', NULL);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for dispose_device
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `dispose_device`;
|
||||
CREATE TABLE `dispose_device` (
|
||||
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '设备唯一标识符',
|
||||
`ipAddr` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备IP地址, IPv4/IPv6',
|
||||
`ipPort` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '端口',
|
||||
`deviceType` int(11) NOT NULL DEFAULT 0 COMMENT '能力节点类型,0:迪普UMC平台,1:浩瀚设备',
|
||||
`areaCode` int(11) NOT NULL COMMENT '设备物理位置区域码',
|
||||
`deviceName` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
|
||||
`manufacturer` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '生产厂商',
|
||||
`model` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '型号',
|
||||
`version` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '软件版本',
|
||||
`userName` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '系统管理用户名',
|
||||
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '系统管理密码',
|
||||
`urlPath` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'URL路径',
|
||||
`urlType` int(11) NOT NULL DEFAULT 0 COMMENT 'URL类型: 0: HTTP, 1: HTTPS',
|
||||
`readme` varchar(1024) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '备注',
|
||||
`status` int(11) NOT NULL DEFAULT 0 COMMENT '状态,0:正常,1:锁定,2:禁用, 3:删除',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `ipAddr`(`ipAddr`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of dispose_device
|
||||
-- ----------------------------
|
||||
INSERT INTO `dispose_device` VALUES (1, '127.0.0.1', '', 999, 0, '虚拟处置设备', 'Virtual Dispose Device', 'CMCC', 'V0.0.1', '', '', '', 0, '持续集成单元测试用', 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for dispose_task
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `dispose_task`;
|
||||
CREATE TABLE `dispose_task` (
|
||||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '处置任务唯一标识符',
|
||||
`deviceId` int(10) NOT NULL COMMENT '处置设备唯一标识符',
|
||||
`accountId` int(10) UNSIGNED NOT NULL COMMENT '用户唯一标识符',
|
||||
`disposeCapacity` int(11) NOT NULL COMMENT '处置能力类型:0:清洗 1:高防 2:黑洞 3:检测',
|
||||
`disposeIp` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '处置IP',
|
||||
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '开始时间',
|
||||
`planEndTime` timestamp(0) NOT NULL DEFAULT '1970-01-02 00:00:00' COMMENT '计划结束时间',
|
||||
`endTime` timestamp(0) NULL DEFAULT '1970-01-02 00:00:00' COMMENT '实际结束时间',
|
||||
`flowDirection` int(11) NOT NULL DEFAULT 2 COMMENT '流量方向, 0:流入;1:流出;2:双向',
|
||||
`attackType` bigint(20) UNSIGNED NOT NULL DEFAULT 18446744073709551615 COMMENT '攻击类型,默认0, 全部攻击',
|
||||
`flowBandWidth` int(10) UNSIGNED NULL DEFAULT 1024 COMMENT '攻击流量占用带宽(MB)',
|
||||
`currentStatus` int(11) NOT NULL DEFAULT 0 COMMENT '状态,0:停止。1:启动',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `dispose_task_device_capacity_id_fk`(`disposeCapacity`) USING BTREE,
|
||||
INDEX `dispose_task_user_account_id_fk`(`accountId`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of dispose_task
|
||||
-- ----------------------------
|
||||
INSERT INTO `dispose_task` VALUES (1, -1, 1, 0, '192.168.10.1', CURRENT_TIMESTAMP, date_add(now(), interval 10 MINUTE), null, 2, 8796093022207, 1024, 0);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for user_account
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `user_account`;
|
||||
CREATE TABLE `user_account` (
|
||||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '账户唯一编号',
|
||||
`username` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
|
||||
`password` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
|
||||
`createTime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
|
||||
`operators` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作员',
|
||||
`lastLoginTime` timestamp(0) NOT NULL DEFAULT '1970-01-02 00:00:00' COMMENT '最后一次成功登录时间',
|
||||
`token` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '用户token',
|
||||
`lastAccess` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '最后一次访问时间戳',
|
||||
`lockTime` timestamp(0) NOT NULL DEFAULT '1970-01-02 00:00:00' COMMENT '账户锁定时间',
|
||||
`pwdErrTimes` int(10) NOT NULL DEFAULT 0 COMMENT '密码错误次数',
|
||||
`status` int(11) NULL DEFAULT 0 COMMENT '账户状态',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `USERNAME`(`username`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of user_account
|
||||
-- ----------------------------
|
||||
INSERT INTO `user_account` VALUES (1, 'admin', 'c3855e6b6bb120450f160ba91134522868f89d36062f2061ebeefd80817e1d58', '0000-00-00 00:00:00', '', '2020-09-11 00:34:16', 'c02094875da6d6b60a5ac7f056d40066a85005569bf7ce8ff03a50963651f931', '2020-09-11 00:34:16', '1970-01-02 00:00:00', 0, 0);
|
||||
|
||||
SET FOREIGN_KEY_CHECKS = 1;
|
Loading…
Reference in New Issue