text: -- MySQL dump 10.13  Distrib 5.6.49, for Linux (x86_64)
  --
  -- Host: localhost    Database: graduation
  -- ------------------------------------------------------
  -- Server version	5.6.49-log
  
  /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  /*!40101 SET NAMES utf8 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `assignment`
  --
  
  DROP TABLE IF EXISTS `assignment`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `assignment` (
    `assignment_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `course_id` int(11) NOT NULL,
    `author_id` varchar(255) NOT NULL,
    `assignment_name` varchar(255) NOT NULL,
    `assignment_desc` varchar(255) NOT NULL,
    `create_time` datetime NOT NULL,
    PRIMARY KEY (`assignment_id`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `assignment`
  --
  
  LOCK TABLES `assignment` WRITE;
  /*!40000 ALTER TABLE `assignment` DISABLE KEYS */;
  /*!40000 ALTER TABLE `assignment` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `comment`
  --
  
  DROP TABLE IF EXISTS `comment`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `comment` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `assignment_id` int(11) NOT NULL,
    `course_id` int(11) NOT NULL,
    `user_name` varchar(255) NOT NULL,
    `user_id` varchar(255) NOT NULL,
    `author_id` varchar(255) NOT NULL,
    `create_time` datetime NOT NULL,
    `content` varchar(255) NOT NULL,
    `score` varchar(255) NOT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `weiyisuoying` (`assignment_id`,`course_id`,`user_name`,`user_id`,`author_id`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `comment`
  --
  
  LOCK TABLES `comment` WRITE;
  /*!40000 ALTER TABLE `comment` DISABLE KEYS */;
  /*!40000 ALTER TABLE `comment` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `course`
  --
  
  DROP TABLE IF EXISTS `course`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `course` (
    `course_id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程ID',
    `course_name` varchar(255) NOT NULL COMMENT '课程名称',
    `author_id` varchar(255) NOT NULL COMMENT '创建者ID',
    `course_desc` longtext COMMENT '课程描述',
    `create_time` datetime NOT NULL COMMENT '创建时间',
    PRIMARY KEY (`course_id`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `course`
  --
  
  LOCK TABLES `course` WRITE;
  /*!40000 ALTER TABLE `course` DISABLE KEYS */;
  /*!40000 ALTER TABLE `course` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `elective`
  --
  
  DROP TABLE IF EXISTS `elective`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `elective` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` varchar(255) NOT NULL COMMENT '用户ID',
    `user_name` varchar(255) NOT NULL COMMENT '用户姓名',
    `course_id` int(11) NOT NULL COMMENT '课程ID',
    `course_name` varchar(255) NOT NULL COMMENT '课程名称',
    `join_time` datetime NOT NULL COMMENT '加入课程时间',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `user_id_and_course_id` (`user_id`,`course_id`) USING BTREE COMMENT '用户ID与课程ID唯一索引'
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `elective`
  --
  
  LOCK TABLES `elective` WRITE;
  /*!40000 ALTER TABLE `elective` DISABLE KEYS */;
  /*!40000 ALTER TABLE `elective` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `files`
  --
  
  DROP TABLE IF EXISTS `files`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `files` (
    `file_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `assignment_id` int(11) NOT NULL COMMENT '作业ID',
    `course_id` int(11) NOT NULL,
    `file_name` varchar(255) NOT NULL COMMENT '文件名称',
    `author_id` varchar(255) NOT NULL COMMENT '用户ID',
    `file_path` varchar(255) NOT NULL COMMENT '文件的路径',
    `create_time` datetime NOT NULL COMMENT '创建时间',
    PRIMARY KEY (`file_id`) USING BTREE,
    UNIQUE KEY `唯一文件` (`course_id`,`file_name`,`author_id`,`file_path`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `files`
  --
  
  LOCK TABLES `files` WRITE;
  /*!40000 ALTER TABLE `files` DISABLE KEYS */;
  /*!40000 ALTER TABLE `files` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `user`
  --
  
  DROP TABLE IF EXISTS `user`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user` (
    `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
    `user_id` varchar(255) NOT NULL,
    `name` varchar(255) NOT NULL,
    `pwd` varchar(255) NOT NULL,
    `account_type` varchar(255) NOT NULL,
    `create_time` datetime NOT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `user_id` (`user_id`) USING BTREE
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user`
  --
  
  LOCK TABLES `user` WRITE;
  /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  INSERT INTO `user` VALUES (1,'ADMIN','admin','21232F297A57A5A743894A0E4A801FC3','2','2021-05-28 10:11:17'),(2,'STUDENT','学生','CD73502828457D15655BBD7A63FB0BC8','0','2021-05-28 10:12:31'),(3,'TEACHER','教师','8D788385431273D11E8B43BB78F3AA41','1','2021-05-28 10:13:31');
  /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `user_status`
  --
  
  DROP TABLE IF EXISTS `user_status`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user_status` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `user_id` varchar(255) NOT NULL COMMENT '用户ID',
    `name` varchar(255) NOT NULL COMMENT '用户名称\r\n用户姓名',
    `account_type` varchar(255) NOT NULL COMMENT '账号类型，0-学生、1-教师、2-管理员',
    `account_disabled` varchar(255) NOT NULL COMMENT '账户禁用情况，0-正常、1-禁用',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE KEY `user_id` (`user_id`,`name`,`account_type`) USING BTREE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user_status`
  --
  
  LOCK TABLES `user_status` WRITE;
  /*!40000 ALTER TABLE `user_status` DISABLE KEYS */;
  /*!40000 ALTER TABLE `user_status` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Dumping events for database 'graduation'
  --
  
  --
  -- Dumping routines for database 'graduation'
  --
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2021-05-28 10:14:46
  