22301080 | fd521b0 | 2025-04-24 23:22:49 +0800 | [diff] [blame^] | 1 | -- MySQL dump 10.13 Distrib 8.0.36, for Win64 (x86_64) |
| 2 | -- |
| 3 | -- Host: 127.0.0.1 Database: ptpdata |
| 4 | -- ------------------------------------------------------ |
| 5 | -- Server version 8.0.36 |
| 6 | |
| 7 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; |
| 8 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; |
| 9 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; |
| 10 | /*!50503 SET NAMES utf8mb4 */; |
| 11 | /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; |
| 12 | /*!40103 SET TIME_ZONE='+00:00' */; |
| 13 | /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; |
| 14 | /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |
| 15 | /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; |
| 16 | /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; |
| 17 | |
| 18 | -- |
| 19 | -- Table structure for table `assement` |
| 20 | -- |
| 21 | |
| 22 | DROP TABLE IF EXISTS `assement`; |
| 23 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 24 | /*!50503 SET character_set_client = utf8mb4 */; |
| 25 | CREATE TABLE `assement` ( |
| 26 | `ID` int NOT NULL AUTO_INCREMENT, |
| 27 | `username` varchar(255) DEFAULT NULL, |
| 28 | `assementLevel` int DEFAULT NULL, |
| 29 | `startDate` date DEFAULT NULL, |
| 30 | `uploadNow` int DEFAULT NULL, |
| 31 | `downloadNow` int DEFAULT NULL, |
| 32 | `magicPointNow` int DEFAULT NULL, |
| 33 | PRIMARY KEY (`ID`), |
| 34 | KEY `username` (`username`), |
| 35 | KEY `assementLevel` (`assementLevel`), |
| 36 | CONSTRAINT `assement_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`), |
| 37 | CONSTRAINT `assement_ibfk_2` FOREIGN KEY (`assementLevel`) REFERENCES `assement_standerd` (`levelStanderd`) |
| 38 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 39 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 40 | |
| 41 | -- |
| 42 | -- Dumping data for table `assement` |
| 43 | -- |
| 44 | |
| 45 | LOCK TABLES `assement` WRITE; |
| 46 | /*!40000 ALTER TABLE `assement` DISABLE KEYS */; |
| 47 | /*!40000 ALTER TABLE `assement` ENABLE KEYS */; |
| 48 | UNLOCK TABLES; |
| 49 | |
| 50 | -- |
| 51 | -- Table structure for table `assement_standerd` |
| 52 | -- |
| 53 | |
| 54 | DROP TABLE IF EXISTS `assement_standerd`; |
| 55 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 56 | /*!50503 SET character_set_client = utf8mb4 */; |
| 57 | CREATE TABLE `assement_standerd` ( |
| 58 | `levelStanderd` int NOT NULL, |
| 59 | `registTime` int DEFAULT NULL, |
| 60 | `uploadDemand` int DEFAULT NULL, |
| 61 | `downloadDemand` int DEFAULT NULL, |
| 62 | `magicPointDemand` int DEFAULT NULL, |
| 63 | PRIMARY KEY (`levelStanderd`) |
| 64 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 65 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 66 | |
| 67 | -- |
| 68 | -- Dumping data for table `assement_standerd` |
| 69 | -- |
| 70 | |
| 71 | LOCK TABLES `assement_standerd` WRITE; |
| 72 | /*!40000 ALTER TABLE `assement_standerd` DISABLE KEYS */; |
| 73 | /*!40000 ALTER TABLE `assement_standerd` ENABLE KEYS */; |
| 74 | UNLOCK TABLES; |
| 75 | |
| 76 | -- |
| 77 | -- Table structure for table `invite_code` |
| 78 | -- |
| 79 | |
| 80 | DROP TABLE IF EXISTS `invite_code`; |
| 81 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 82 | /*!50503 SET character_set_client = utf8mb4 */; |
| 83 | CREATE TABLE `invite_code` ( |
| 84 | `ID` int NOT NULL AUTO_INCREMENT, |
| 85 | `code` varchar(8) NOT NULL, |
| 86 | `generateUser` varchar(20) DEFAULT NULL, |
| 87 | `isUsed` tinyint(1) NOT NULL DEFAULT '0', |
| 88 | PRIMARY KEY (`ID`), |
| 89 | KEY `generateUser` (`generateUser`), |
| 90 | CONSTRAINT `invite_code_ibfk_1` FOREIGN KEY (`generateUser`) REFERENCES `user` (`username`) |
| 91 | ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 92 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 93 | |
| 94 | -- |
| 95 | -- Dumping data for table `invite_code` |
| 96 | -- |
| 97 | |
| 98 | LOCK TABLES `invite_code` WRITE; |
| 99 | /*!40000 ALTER TABLE `invite_code` DISABLE KEYS */; |
| 100 | INSERT INTO `invite_code` (`ID`, `code`, `generateUser`, `isUsed`) VALUES (1,'123','test',1); |
| 101 | /*!40000 ALTER TABLE `invite_code` ENABLE KEYS */; |
| 102 | UNLOCK TABLES; |
| 103 | |
| 104 | -- |
| 105 | -- Table structure for table `resourse` |
| 106 | -- |
| 107 | |
| 108 | DROP TABLE IF EXISTS `resourse`; |
| 109 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 110 | /*!50503 SET character_set_client = utf8mb4 */; |
| 111 | CREATE TABLE `resourse` ( |
| 112 | `ID` int NOT NULL AUTO_INCREMENT, |
| 113 | `username` varchar(255) DEFAULT NULL, |
| 114 | `resourseName` varchar(255) DEFAULT NULL, |
| 115 | `info` text, |
| 116 | `upload_date` date DEFAULT NULL, |
| 117 | `file_size` int DEFAULT NULL, |
| 118 | `discount` enum('yes','no') DEFAULT NULL, |
| 119 | PRIMARY KEY (`ID`), |
| 120 | KEY `username` (`username`), |
| 121 | CONSTRAINT `resourse_ibfk_1` FOREIGN KEY (`username`) REFERENCES `user` (`username`) |
| 122 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 123 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 124 | |
| 125 | -- |
| 126 | -- Dumping data for table `resourse` |
| 127 | -- |
| 128 | |
| 129 | LOCK TABLES `resourse` WRITE; |
| 130 | /*!40000 ALTER TABLE `resourse` DISABLE KEYS */; |
| 131 | /*!40000 ALTER TABLE `resourse` ENABLE KEYS */; |
| 132 | UNLOCK TABLES; |
| 133 | |
| 134 | -- |
| 135 | -- Table structure for table `testdata` |
| 136 | -- |
| 137 | |
| 138 | DROP TABLE IF EXISTS `testdata`; |
| 139 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 140 | /*!50503 SET character_set_client = utf8mb4 */; |
| 141 | CREATE TABLE `testdata` ( |
| 142 | `name` varchar(100) DEFAULT NULL |
| 143 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 144 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 145 | |
| 146 | -- |
| 147 | -- Dumping data for table `testdata` |
| 148 | -- |
| 149 | |
| 150 | LOCK TABLES `testdata` WRITE; |
| 151 | /*!40000 ALTER TABLE `testdata` DISABLE KEYS */; |
| 152 | INSERT INTO `testdata` (`name`) VALUES ('zzz'),('newtest'),('newtest2'); |
| 153 | /*!40000 ALTER TABLE `testdata` ENABLE KEYS */; |
| 154 | UNLOCK TABLES; |
| 155 | |
| 156 | -- |
| 157 | -- Table structure for table `user` |
| 158 | -- |
| 159 | |
| 160 | DROP TABLE IF EXISTS `user`; |
| 161 | /*!40101 SET @saved_cs_client = @@character_set_client */; |
| 162 | /*!50503 SET character_set_client = utf8mb4 */; |
| 163 | CREATE TABLE `user` ( |
| 164 | `username` varchar(20) NOT NULL, |
| 165 | `password` varchar(200) NOT NULL, |
| 166 | `authority` enum('USER','ADMIN','LIMIT','BAN') NOT NULL DEFAULT 'USER', |
| 167 | `level` int DEFAULT '0', |
| 168 | `registTime` date NOT NULL, |
| 169 | `lastLogin` date DEFAULT NULL, |
| 170 | `upload` int DEFAULT '0', |
| 171 | `download` int DEFAULT '0', |
| 172 | `shareRate` int DEFAULT '100', |
| 173 | `magicPoints` int DEFAULT '0', |
| 174 | PRIMARY KEY (`username`), |
| 175 | CONSTRAINT `user_chk_1` CHECK ((`level` between 0 and 6)), |
| 176 | CONSTRAINT `user_chk_2` CHECK ((`shareRate` between 0 and 100)) |
| 177 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 178 | /*!40101 SET character_set_client = @saved_cs_client */; |
| 179 | |
| 180 | -- |
| 181 | -- Dumping data for table `user` |
| 182 | -- |
| 183 | |
| 184 | LOCK TABLES `user` WRITE; |
| 185 | /*!40000 ALTER TABLE `user` DISABLE KEYS */; |
| 186 | INSERT INTO `user` (`username`, `password`, `authority`, `level`, `registTime`, `lastLogin`, `upload`, `download`, `shareRate`, `magicPoints`) VALUES ('test','123456','USER',0,'2025-04-19',NULL,0,0,100,0),('ww','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','USER',0,'2025-04-20',NULL,0,0,100,0),('xxx','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','USER',0,'2025-04-20',NULL,0,0,100,0),('zzz','8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92','USER',0,'2025-04-20',NULL,0,0,100,0); |
| 187 | /*!40000 ALTER TABLE `user` ENABLE KEYS */; |
| 188 | UNLOCK TABLES; |
| 189 | /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; |
| 190 | |
| 191 | /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; |
| 192 | /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; |
| 193 | /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; |
| 194 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; |
| 195 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; |
| 196 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
| 197 | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
| 198 | |
| 199 | -- Dump completed on 2025-04-20 21:30:15 |