mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2025-08-15 03:04:37 +08:00
143 lines
6.2 KiB
SQL
143 lines
6.2 KiB
SQL
-- MySQL dump 10.13 Distrib 8.0.19, for osx10.15 (x86_64)
|
|
--
|
|
-- Host: 127.0.0.1 Database: fastapi-admin
|
|
-- ------------------------------------------------------
|
|
-- Server version 8.0.19
|
|
|
|
/*!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 */;
|
|
/*!50503 SET NAMES utf8mb4 */;
|
|
/*!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 `category`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `category`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `category` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`slug` varchar(200) NOT NULL,
|
|
`name` varchar(200) NOT NULL,
|
|
`created_at` datetime(6) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `category`
|
|
--
|
|
|
|
LOCK TABLES `category` WRITE;
|
|
/*!40000 ALTER TABLE `category` DISABLE KEYS */;
|
|
INSERT INTO `category` VALUES (1,'test','test','2020-04-13 15:16:25.000000'),(2,'test','test','2020-04-13 15:16:25.000000'),(3,'test','test','2020-04-13 15:16:25.000000'),(4,'test','test','2020-04-13 15:16:25.000000'),(5,'test','test','2020-04-13 15:16:25.000000'),(6,'test','test','2020-04-13 15:16:25.000000'),(7,'test','test','2020-04-13 15:16:25.000000'),(8,'test','test','2020-04-13 15:16:25.000000'),(9,'test','test','2020-04-13 15:16:25.000000');
|
|
/*!40000 ALTER TABLE `category` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `product`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `product`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `product` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`name` varchar(50) NOT NULL,
|
|
`view_num` int NOT NULL,
|
|
`sort` int NOT NULL,
|
|
`is_reviewed` tinyint(1) NOT NULL,
|
|
`type` smallint NOT NULL COMMENT 'article: 1\npage: 2',
|
|
`image` varchar(200) NOT NULL,
|
|
`body` longtext NOT NULL,
|
|
`created_at` datetime(6) NOT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `product`
|
|
--
|
|
|
|
LOCK TABLES `product` WRITE;
|
|
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
|
|
INSERT INTO `product` VALUES (1,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(2,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(3,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(4,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(5,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(6,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(7,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(8,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000'),(9,'Phone',10,1,1,1,'https://github.com/long2ice/fastapi-admin','test','2020-04-13 15:16:56.000000');
|
|
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `product_category`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `product_category`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `product_category` (
|
|
`product_id` int NOT NULL,
|
|
`category_id` int NOT NULL,
|
|
KEY `product_id` (`product_id`),
|
|
KEY `category_id` (`category_id`),
|
|
CONSTRAINT `product_category_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `product` (`id`) ON DELETE CASCADE,
|
|
CONSTRAINT `product_category_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `category` (`id`) ON DELETE CASCADE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Dumping data for table `product_category`
|
|
--
|
|
|
|
LOCK TABLES `product_category` WRITE;
|
|
/*!40000 ALTER TABLE `product_category` DISABLE KEYS */;
|
|
INSERT INTO `product_category` VALUES (1,1);
|
|
/*!40000 ALTER TABLE `product_category` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
|
|
--
|
|
-- Table structure for table `user`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `user`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `user` (
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
`username` varchar(20) NOT NULL,
|
|
`password` varchar(200) NOT NULL,
|
|
`last_login` datetime(6) NOT NULL COMMENT 'Last Login',
|
|
`is_active` tinyint(1) NOT NULL COMMENT 'Is Active',
|
|
`avatar` varchar(200) NOT NULL,
|
|
`intro` longtext NOT NULL,
|
|
`created_at` datetime(6) NOT NULL,
|
|
PRIMARY KEY (`id`),
|
|
UNIQUE KEY `username` (`username`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
/*!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,'long2ice','$2b$12$CD5ImAgBr7TZpJABxuXASOXz/cAFMIhXsmnZCU.cvo/c.kOOpSkXq','2020-04-13 12:44:06.000000',1,'https://c-ssl.duitang.com/uploads/item/201901/09/20190109072726_aNNZd.thumb.1000_0.jpeg','test','2020-04-13 12:44:14.000000');
|
|
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
|
|
UNLOCK TABLES;
|
|
/*!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 2020-04-13 15:27:30
|