/*
 Navicat Premium Data Transfer

 Source Server         : localMySQL
 Source Server Type    : MySQL
 Source Server Version : 50729
 Source Host           : localhost:3306
 Source Schema         : educational

 Target Server Type    : MySQL
 Target Server Version : 50729
 File Encoding         : 65001

 Date: 29/12/2024 21:45:32
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for course
-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程名称',
  `course_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程编号',
  `teacher_id` int(11) NULL DEFAULT NULL COMMENT '任课老师id',
  `remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '课程简介',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '课程表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of course
-- ----------------------------
INSERT INTO `course` VALUES (1, 'JavaWeb实战23', 'No00123', 100026, 'java实战课21');
INSERT INTO `course` VALUES (6, 'servlet实战', 'No002', 100001, 'servlet实战演示');
INSERT INTO `course` VALUES (7, '高音训练课', '0003', 100001, '111111');
INSERT INTO `course` VALUES (8, 'java', '003', 100001, '2');
INSERT INTO `course` VALUES (9, '周杰伦音乐课', 'N0999', 100026, '');
INSERT INTO `course` VALUES (10, '跳舞课', '123', 100028, '1111');
INSERT INTO `course` VALUES (11, '游泳课', 'YY-001', 100026, '1111');

-- ----------------------------
-- Table structure for course_selection
-- ----------------------------
DROP TABLE IF EXISTS `course_selection`;
CREATE TABLE `course_selection`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `course_id` int(11) NULL DEFAULT NULL COMMENT '课程id',
  `student_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '学生id',
  `scores` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '分数',
  `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '选择时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 34 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '课程选择表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of course_selection
-- ----------------------------
INSERT INTO `course_selection` VALUES (30, 1, '100029', NULL, '2024-12-29 20:46:21');
INSERT INTO `course_selection` VALUES (31, 6, '100029', '88', '2024-12-29 21:19:51');
INSERT INTO `course_selection` VALUES (32, 11, '100030', '11', '2024-12-29 21:22:18');
INSERT INTO `course_selection` VALUES (33, 6, '100030', NULL, '2024-12-29 20:58:44');

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user`  (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `username` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `password` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `sex` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '性别 1男 2女',
  `real_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '真实姓名',
  `age` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '年龄',
  `role_id` int(11) NOT NULL COMMENT '角色Id 3管理员 2老师 1学生',
  `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `createdate` datetime(0) NULL DEFAULT NULL,
  `remark` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`, `username`) USING BTREE,
  UNIQUE INDEX `phone`(`phone`) USING BTREE,
  INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 100031 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES (100001, 'admin', 'admin', '1', '詹姆斯', '402', 3, '18802290129', '2021-06-01 18:20:51', '系统管理员12');
INSERT INTO `user` VALUES (100026, 'user11', '111111', '1', '甪里1', '201', 2, '15555555551', '2024-12-29 14:31:00', '1');
INSERT INTO `user` VALUES (100028, 'user2', '123456', '1', '安东尼', '40', 2, '15788888888', '2024-12-29 18:08:43', '安东尼');
INSERT INTO `user` VALUES (100029, 'student1', '123456', '1', '李元芳', '18', 1, '13244444444', '2024-12-29 19:37:46', '1');
INSERT INTO `user` VALUES (100030, 'student2', '123456', '1', '狄仁杰', '22', 1, '12222222222', '2024-12-29 20:53:22', '1');

SET FOREIGN_KEY_CHECKS = 1;
