1 Star 0 Fork 19

李黄/云存储-网盘

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cloud-storage-disk.sql 5.76 KB
一键复制 编辑 原始数据 按行查看 历史
-- MySQL dump 10.13 Distrib 8.0.33, for macos11.7 (x86_64)
--
-- Host: 127.0.0.1 Database: cloud_storage_disk
-- ------------------------------------------------------
-- Server version 8.0.33
/*!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 `block_metadata`
--
DROP TABLE IF EXISTS `block_metadata`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `block_metadata` (
`id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件块 id',
`hash` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件块 hash',
`path` varchar(1000) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件块存储路径',
`size` bigint NOT NULL COMMENT '文件块大小',
`create_time` bigint NOT NULL,
`update_time` bigint NOT NULL,
`is_delete` tinyint DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `block_metadata_pk2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='文件块元数据';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `file_block`
--
DROP TABLE IF EXISTS `file_block`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `file_block` (
`id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '关联 id',
`file_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件 id',
`block_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件块 id',
`index` smallint NOT NULL COMMENT '文件块序号',
`count` smallint NOT NULL COMMENT '文件块数量',
`sharding_size` bigint NOT NULL COMMENT '分片大小',
`file_size` bigint NOT NULL COMMENT '文件总大小',
`is_shard` tinyint NOT NULL COMMENT '是否分片:0.不分片;1.分片',
`create_time` bigint NOT NULL,
`update_time` bigint NOT NULL,
`is_delete` tinyint DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `file_block_pk2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='文件与文件块的关联';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `file_metadata`
--
DROP TABLE IF EXISTS `file_metadata`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `file_metadata` (
`id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件 id',
`pid` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '上级文件 id',
`name` varchar(1000) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件名',
`path` varchar(1000) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件存储路径',
`hash` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件 hash',
`type` tinyint NOT NULL COMMENT '文件类型:0.文件;1.文件夹',
`ext` varchar(10) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件后缀名',
`size` bigint NOT NULL COMMENT '文件大小',
`upload_time` bigint NOT NULL COMMENT '上传时间',
`ancestors` text COLLATE utf8mb4_general_ci NOT NULL COMMENT '祖级文件 id 列表',
`is_delete` tinyint DEFAULT '0',
`user_id` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '文件操作人 id',
`create_time` bigint NOT NULL,
`update_time` bigint NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `file_metadata_pk2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='文件元数据';
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- 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` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户 id',
`nick_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '昵称',
`email` varchar(50) COLLATE utf8mb4_general_ci NOT NULL COMMENT '邮箱',
`password` varchar(32) COLLATE utf8mb4_general_ci NOT NULL COMMENT '账户密码',
`avatar` varchar(1024) COLLATE utf8mb4_general_ci NOT NULL COMMENT '头像地址',
`birthday` bigint DEFAULT '0' COMMENT '出生日期',
`age` smallint DEFAULT '0' COMMENT '年龄',
`gender` tinyint DEFAULT '0' COMMENT '性别',
`phone` varchar(13) COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '联系方式',
`total_space_size` bigint DEFAULT '0' COMMENT '账户总空间',
`used_space_size` bigint DEFAULT '0' COMMENT '账户已用空间',
`create_time` bigint NOT NULL,
`update_time` bigint NOT NULL,
`is_delete` tinyint DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `User_pk2` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='用户表';
/*!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-07-25 9:03:40
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mhsto/cloud-storage-disk.git
git@gitee.com:mhsto/cloud-storage-disk.git
mhsto
cloud-storage-disk
云存储-网盘
master

搜索帮助