DROP TABLE IF EXISTS `is_training_operate_attach`;
CREATE TABLE `is_training_operate_attach` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `training_question_id` int(11) DEFAULT NULL,
  `attach_name` varchar(511) COLLATE utf8mb4_bin DEFAULT NULL,
  `attach_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '图片路径',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT;

DROP TABLE IF EXISTS `is_training_check_dimension`;
CREATE TABLE `is_training_check_dimension` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `is_system` int(2) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT;

DROP TABLE IF EXISTS `is_training_operate_template`;
CREATE TABLE `is_training_operate_template` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `template_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '模板名称',
  `is_enable` int(2) DEFAULT NULL COMMENT '是否启用',
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT;

DROP TABLE IF EXISTS `is_training_operate_template_category`;
CREATE TABLE `is_training_operate_template_category` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `operate_template_id` int(11) DEFAULT NULL,
  `category_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '分类名称',
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT;

DROP TABLE IF EXISTS `is_training_operate_template_detail`;
CREATE TABLE `is_training_operate_template_detail` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `operate_template_id` int(11) DEFAULT NULL,
  `operate_category_id` int(11) DEFAULT NULL,
  `business_id` int(11) DEFAULT NULL,
  `detail_name` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `detail_url` varchar(255) COLLATE utf8mb4_bin DEFAULT NULL,
  `detail_type` int(2) DEFAULT NULL COMMENT '实操题传1 实操商品传2',
  `score` float(11,1) DEFAULT NULL,
  `is_redline` int(2) DEFAULT NULL,
  `sort` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPACT;