You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
218 lines
7.4 KiB
218 lines
7.4 KiB
-- MySQL dump 10.13 Distrib 8.0.32, for Linux (x86_64)
|
|
--
|
|
-- Host: localhost Database: DBName
|
|
-- ------------------------------------------------------
|
|
-- Server version 8.0.32
|
|
|
|
/*!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 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 `comment_counts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `comment_counts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `comment_counts` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`number` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `com_count_id` (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `comments`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `comments`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `comments` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`video_id` bigint DEFAULT NULL,
|
|
`user_id` bigint DEFAULT NULL,
|
|
`conversation_id` bigint DEFAULT NULL,
|
|
`last_id` bigint DEFAULT NULL,
|
|
`to_user_id` bigint DEFAULT NULL,
|
|
`content` longtext,
|
|
`timestamp` longtext,
|
|
`status` tinyint(1) DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `video_id` (`video_id`),
|
|
KEY `user_id` (`user_id`),
|
|
KEY `con_id` (`conversation_id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1650841832915230722 DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `favorite_counts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `favorite_counts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `favorite_counts` (
|
|
`video_id` bigint DEFAULT NULL,
|
|
`number` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
KEY `video_id` (`video_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `favorites`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `favorites`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `favorites` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint DEFAULT NULL,
|
|
`video_id` bigint DEFAULT NULL,
|
|
`status` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `user_id` (`user_id`),
|
|
KEY `video_id` (`video_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `follow_counts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `follow_counts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `follow_counts` (
|
|
`user_id` bigint DEFAULT NULL,
|
|
`number` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
KEY `user_id` (`user_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `follower_counts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `follower_counts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `follower_counts` (
|
|
`user_id` bigint DEFAULT NULL,
|
|
`number` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
KEY `user_id` (`user_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `relations`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `relations`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `relations` (
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint DEFAULT NULL,
|
|
`to_user_id` bigint DEFAULT NULL,
|
|
`status` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`),
|
|
KEY `user_id` (`user_id`),
|
|
KEY `to_user_id` (`to_user_id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1650843410099200001 DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `users`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `users`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `users` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_name` varchar(64) DEFAULT NULL,
|
|
`password` varchar(64) DEFAULT NULL,
|
|
`salt` varchar(64) DEFAULT NULL,
|
|
`avatar` varchar(256) DEFAULT NULL,
|
|
`background_image` varchar(256) DEFAULT NULL,
|
|
`signature` varchar(512) DEFAULT NULL,
|
|
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
|
|
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
|
PRIMARY KEY (`id`),
|
|
KEY `username` (`user_name`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1650820151987306497 DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `video_counts`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `video_counts`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `video_counts` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`user_id` bigint unsigned DEFAULT NULL,
|
|
`publish_count` bigint DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`update_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
--
|
|
-- Table structure for table `videos`
|
|
--
|
|
|
|
DROP TABLE IF EXISTS `videos`;
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
CREATE TABLE `videos` (
|
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
|
`author_id` bigint unsigned DEFAULT NULL,
|
|
`title` longtext,
|
|
`video_url` longtext,
|
|
`cover_url` longtext,
|
|
`fav_count` bigint unsigned DEFAULT NULL,
|
|
`com_count` bigint unsigned DEFAULT NULL,
|
|
`created_at` datetime(3) DEFAULT NULL,
|
|
`updated_at` datetime(3) DEFAULT NULL,
|
|
PRIMARY KEY (`id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1650823370861662209 DEFAULT CHARSET=utf8mb3;
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
/*!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 2023-05-06 14:50:36
|
|
|