 -- Table structure for system_queue
 -- ----------------------------
 DROP TABLE IF EXISTS `system_queue`;
-CREATE TABLE `system_queue` (
+CREATE TABLE `system_queue`  (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
-  `code` varchar(20) NOT NULL DEFAULT '' COMMENT '任务编号',
-  `title` varchar(50) NOT NULL DEFAULT '' COMMENT '任务名称',
-  `command` varchar(500) DEFAULT '' COMMENT '执行指令',
-  `exec_pid` bigint(20) DEFAULT '0' COMMENT '执行进程',
-  `exec_data` longtext COMMENT '执行参数',
-  `exec_time` bigint(20) DEFAULT '0' COMMENT '执行时间',
-  `exec_desc` varchar(500) DEFAULT '' COMMENT '状态描述',
-  `enter_time` decimal(20,4) DEFAULT '0.0000' COMMENT '开始时间',
-  `outer_time` decimal(20,4) DEFAULT '0.0000' COMMENT '结束时间',
-  `attempts` bigint(20) DEFAULT '0' COMMENT '执行次数',
-  `rscript` tinyint(1) DEFAULT '1' COMMENT '执行模式(0单例,1多例)',
-  `status` tinyint(1) DEFAULT '1' COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
+  `code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务编号',
+  `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
+  `command` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行指令',
+  `exec_pid` bigint(20) NULL DEFAULT 0 COMMENT '执行进程',
+  `exec_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '执行参数',
+  `exec_time` bigint(20) NULL DEFAULT 0 COMMENT '执行时间',
+  `exec_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '执行描述',
+  `enter_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '开始时间',
+  `outer_time` decimal(20, 4) NULL DEFAULT 0.0000 COMMENT '结束时间',
+  `loops_time` bigint(20) NULL DEFAULT 0 COMMENT '循环时间',
+  `attempts` bigint(20) NULL DEFAULT 0 COMMENT '执行次数',
+  `rscript` tinyint(1) NULL DEFAULT 1 COMMENT '任务类型(0单例,1多例)',
+  `status` tinyint(1) NULL DEFAULT 1 COMMENT '任务状态(1新任务,2处理中,3成功,4失败)',
   `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
   PRIMARY KEY (`id`) USING BTREE,
-  KEY `idx_system_queue_code` (`code`) USING BTREE,
-  KEY `idx_system_queue_title` (`title`) USING BTREE,
-  KEY `idx_system_queue_status` (`status`) USING BTREE,
-  KEY `idx_system_queue_rscript` (`rscript`) USING BTREE,
-  KEY `idx_system_queue_create_at` (`create_at`) USING BTREE,
-  KEY `idx_system_queue_exec_time` (`exec_time`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT='系统-任务';
+  INDEX `idx_system_queue_code`(`code`) USING BTREE,
+  INDEX `idx_system_queue_title`(`title`) USING BTREE,
+  INDEX `idx_system_queue_status`(`status`) USING BTREE,
+  INDEX `idx_system_queue_rscript`(`rscript`) USING BTREE,
+  INDEX `idx_system_queue_create_at`(`create_at`) USING BTREE,
+  INDEX `idx_system_queue_exec_time`(`exec_time`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统-任务';
 
 -- ----------------------------
 -- Table structure for system_user

INSERT INTO `system_config` VALUES ('wechat', 'mch_ssl_p12', '');
INSERT INTO `system_config` VALUES ('wechat', 'mch_ssl_key', '');
INSERT INTO `system_config` VALUES ('wechat', 'mch_ssl_cer', '');

-- ----------------------------
-- Table structure for system_data

  `read_num` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '阅读数量',
  `create_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信-文章';

SET FOREIGN_KEY_CHECKS = 1;
