/*
 Navicat Premium Data Transfer

 Source Server         : 本机
 Source Server Type    : MariaDB
 Source Server Version : 100214
 Source Host           : 127.0.0.1:3306
 Source Schema         : ntc

 Target Server Type    : MariaDB
 Target Server Version : 100214
 File Encoding         : 65001

 Date: 02/01/2019 17:15:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for schedule_cfg
-- ----------------------------
DROP TABLE IF EXISTS `schedule_cfg`;
CREATE TABLE `schedule_cfg`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时任务名称，预留',
  `cron_valid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时：月份',
  `cron_invalid` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '定时：天',
  `cfg_id` bigint(20) NOT NULL COMMENT '配置表id',
  `compile_id` bigint(20) NOT NULL COMMENT '编译id',
  `service_id` int(11) NOT NULL COMMENT '业务id',
  `is_valid` int(11) NOT NULL DEFAULT 1 COMMENT '配置生效标识，1:有效,0:无效',
  `is_audit` int(1) NULL DEFAULT NULL COMMENT '审核状态',
  `function_id` int(11) NULL DEFAULT NULL COMMENT 'function id',
  `creator_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
  `create_time` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `editor_id` int(11) NULL DEFAULT NULL COMMENT '修改人id',
  `edit_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `table_name` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '表名',
  `user_region1` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `user_region2` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `user_region3` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `user_region4` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `user_region5` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `del_flag` int(1) NULL DEFAULT 1 COMMENT '删除标识,定时任务是否有效，默认：1',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for schedule_exce_log
-- ----------------------------
DROP TABLE IF EXISTS `schedule_exce_log`;
CREATE TABLE `schedule_exce_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `schedule_id` bigint(20) NOT NULL COMMENT 'schedule_info 表的主键',
  `exce_time` datetime(0) NULL DEFAULT NULL COMMENT '最新执行时间',
  `issue_status` int(255) NULL DEFAULT NULL COMMENT '下发状态：1：生效，0：失效',
  `issue_result` int(255) NULL DEFAULT NULL COMMENT '下发结果：1：成功，0：失败',
  `error_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下发失败原因',
  `compile_id` bigint(20) NULL DEFAULT NULL COMMENT '编译id',
  `is_issue` int(1) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for schedule_exce_new
-- ----------------------------
DROP TABLE IF EXISTS `schedule_exce_new`;
CREATE TABLE `schedule_exce_new`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
  `schedule_id` bigint(20) NOT NULL COMMENT 'schedule_info 表的主键',
  `exce_time` datetime(0) NULL DEFAULT NULL COMMENT '最新执行时间',
  `issue_status` int(255) NULL DEFAULT NULL COMMENT '下发状态：1：生效，0：失效',
  `issue_result` int(255) NULL DEFAULT NULL COMMENT '下发结果：1：成功，0：失败',
  `error_info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '下发失败原因',
  `compile_id` bigint(20) NULL DEFAULT NULL COMMENT '编译id',
  `is_issue` int(255) NULL DEFAULT 0 COMMENT '是否需要下发配置，1：是，0：否',
  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;
