

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for software_study_record_detail
-- ----------------------------
DROP TABLE IF EXISTS `software_study_record_detail`;
CREATE TABLE `software_study_record_detail`  (
                                                 `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                                 `student_record_id` int(11) NULL DEFAULT NULL COMMENT '具体学生记录id',
                                                 `seq` int(11) NULL DEFAULT NULL COMMENT '步骤序号',
                                                 `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
                                                 `start_time` datetime(0) NULL DEFAULT NULL COMMENT '实验开始时间',
                                                 `end_time` datetime(0) NULL DEFAULT NULL COMMENT '实验结束时间',
                                                 `time_used` int(11) NULL DEFAULT NULL COMMENT '实验用时单位s',
                                                 `expect_time` int(11) NULL DEFAULT NULL COMMENT '实验合理用时s',
                                                 `max_score` double(11, 2) NULL DEFAULT NULL COMMENT '实验步骤满分 百分制',
                                                 `score` double(11, 2) NULL DEFAULT NULL COMMENT '实验步骤得分百分制',
                                                 `repeat_count` int(11) NULL DEFAULT NULL COMMENT '实验步骤操作次数',
                                                 `evaluation` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '步骤评价',
                                                 `scoring_model` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '赋分模型',
                                                 `remarks` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
                                                 `dept_id` int(11) NULL DEFAULT NULL COMMENT '学生部门id',
                                                 `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                                 `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                                 `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                 `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                 `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                                 PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 17 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '实验步骤明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_info
-- ----------------------------
DROP TABLE IF EXISTS `software_info`;
CREATE TABLE `software_info`  (
                                  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                  `class_id` int(11) NULL DEFAULT NULL COMMENT '分类',
                                  `software_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件名称',
                                  `software_cover` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '封面图',
                                  `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最新版本号',
                                  `soft_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件编号',
                                  `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '1单机版2网页版3外部链接',
                                  `soft_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件地址',
                                  `company` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件厂商',
                                  `max_connect` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最大并发数',
                                  `min_speed` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '最小带宽',
                                  `soft_desc` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '软件描述',
                                  `secret` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '秘钥',
                                  `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
                                  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                  `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                  `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                  `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                  PRIMARY KEY (`id`) USING BTREE,
                                  UNIQUE INDEX `soft_no`(`soft_no`) USING BTREE,
                                  UNIQUE INDEX `secret`(`secret`) USING BTREE,
                                  INDEX `software_name`(`software_name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '虚拟仿真软件表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_item_info
-- ----------------------------
DROP TABLE IF EXISTS `software_item_info`;
CREATE TABLE `software_item_info`  (
                                       `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                       `soft_id` int(11) NULL DEFAULT NULL COMMENT '软件id',
                                       `item_no` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目编号',
                                       `item_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '项目名称',
                                       `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
                                       `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                       `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                       `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                       `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                       PRIMARY KEY (`id`) USING BTREE,
                                       INDEX `soft_id`(`soft_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 141 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '软件项目信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_resource_info
-- ----------------------------
DROP TABLE IF EXISTS `software_resource_info`;
CREATE TABLE `software_resource_info`  (
                                           `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                           `soft_id` int(11) NULL DEFAULT NULL COMMENT '软件id',
                                           `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类型1视频2文档',
                                           `resource_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源路径',
                                           `resource_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资源名称',
                                           `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
                                           `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                           `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                           `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                           `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                           PRIMARY KEY (`id`) USING BTREE,
                                           INDEX `soft_id`(`soft_id`) USING BTREE,
                                           INDEX `type`(`type`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 170 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '软件资源包' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_class
-- ----------------------------
DROP TABLE IF EXISTS `software_class`;
CREATE TABLE `software_class`  (
                                   `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                   `class_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分类名称',
                                   `parent_id` int(11) NULL DEFAULT 0 COMMENT '父节点主键',
                                   `parent_chain` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0' COMMENT '父链',
                                   `sort` int(11) NULL DEFAULT 0 COMMENT '升序',
                                   `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
                                   `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                   `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                   `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                   `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '虚拟仿真软件分类表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_study_record
-- ----------------------------
DROP TABLE IF EXISTS `software_study_record`;
CREATE TABLE `software_study_record`  (
                                          `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                          `soft_id` int(11) NULL DEFAULT NULL COMMENT '软件id',
                                          `item_id` int(11) NULL DEFAULT NULL COMMENT '软件项目id',
                                          `stu_id` int(11) NULL DEFAULT NULL COMMENT '学生id',
                                          `ticket` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '本次实验令牌',
                                          `title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实验名称：用户学习的实验名称',
                                          `start_time` datetime(0) NULL DEFAULT NULL COMMENT '实验开始时间',
                                          `end_time` datetime(0) NULL DEFAULT NULL COMMENT '实验结束时间',
                                          `is_end` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '是否结束',
                                          `score` double(11, 2) NULL DEFAULT 0.00 COMMENT '总分',
                                          `report_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '实验报告地址',
                                          `comment` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '批注',
                                          `dept_id` int(11) NULL DEFAULT NULL COMMENT '学生部门id',
                                          `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                          `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                          `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                          `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                          `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                          PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学生软件学习记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_tenant_info
-- ----------------------------
DROP TABLE IF EXISTS `software_tenant_info`;
CREATE TABLE `software_tenant_info`  (
                                         `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
                                         `tenant_id` int(11) NULL DEFAULT NULL COMMENT '租户id',
                                         `soft_id` int(11) NULL DEFAULT NULL COMMENT '软件id',
                                         `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '1' COMMENT '1正常2暂停',
                                         `user_id` int(11) NULL DEFAULT NULL COMMENT '创建人id',
                                         `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                         `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                         `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                         `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                         PRIMARY KEY (`id`) USING BTREE,
                                         INDEX `tenant_id`(`tenant_id`) USING BTREE,
                                         INDEX `soft_id`(`soft_id`) USING BTREE,
                                         INDEX `status`(`status`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 101 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '软件学校分配' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for software_department_user
-- ----------------------------
DROP TABLE IF EXISTS `software_department_user`;
CREATE TABLE `software_department_user`  (
                                             `soft_id` int(11) NOT NULL DEFAULT 0 COMMENT '线下课程ID',
                                             `range_id` int(11) NOT NULL DEFAULT 0 COMMENT '指派范围ID',
                                             `type` int(11) NOT NULL DEFAULT 0 COMMENT '指派范围类型[0:部门,1:学员,2:用户组]',
                                             `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
                                             `update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0),
                                             `creator` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                             `updater` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
                                             `tenant_id` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '虚拟仿真软件-学校内分配表' ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
