CREATE TABLE `is_training_activity` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `creator` int(11) DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `activity_name` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动名称',
  `activity_start_time` datetime DEFAULT NULL COMMENT '开始时间',
  `activity_end_time` datetime DEFAULT NULL COMMENT '结束时间',
  `cover` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '封面',
  `activity_intro` text COLLATE utf8mb4_unicode_ci COMMENT '活动简介',
  `activity_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '活动链接',
  `sign_start_time` datetime DEFAULT NULL COMMENT '报名开始时间',
  `sign_end_time` datetime DEFAULT NULL COMMENT '报名结束时间',
  `send_mode` int(2) DEFAULT NULL COMMENT '发放方式 0自动发放  1手动发放',
  `activity_status` int(2) DEFAULT NULL COMMENT '1草稿  2未开始 3进行中 4已结束',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `is_training_activity_attach` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `create_time` datetime DEFAULT NULL,
  `enterprise_id` int(11) DEFAULT NULL,
  `activity_id` int(11) DEFAULT NULL,
  `name` varchar(128) CHARACTER SET utf8mb4 DEFAULT NULL,
  `url` varchar(1000) CHARACTER SET utf8mb4 DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `is_training_activity_user_range` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `enterprise_id` int(11) DEFAULT NULL COMMENT '企业id',
  `activity_id` int(11) DEFAULT NULL COMMENT '活动中心id',
  `user_id` int(11) DEFAULT NULL,
  `role_id` int(11) DEFAULT NULL COMMENT '角色id',
  `tag_id` int(11) DEFAULT NULL,
  `organize_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='活动中心人员';