From 01ed2ce623259482a810739900c1c6a2f087de51 Mon Sep 17 00:00:00 2001 From: YYL469 <2049360881@qq.com> Date: Tue, 2 Jul 2024 22:08:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90createTables.sql=E3=80=91=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0=E6=95=B0=E6=8D=AE=E5=BA=93=E6=89=80=E6=9C=89=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E5=88=9B=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- createTables.sql | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 createTables.sql diff --git a/createTables.sql b/createTables.sql new file mode 100644 index 0000000..d8f5760 --- /dev/null +++ b/createTables.sql @@ -0,0 +1,47 @@ +SET FOREIGN_KEY_CHECKS=0; + +-- ---------------------------- +-- article表 +-- ---------------------------- +CREATE TABLE `article` ( + `id` bigint(20) DEFAULT NULL, + `likeNum` bigint(20) DEFAULT NULL, + `commentsLen` bigint(20) DEFAULT NULL, + `reposts_count` bigint(20) DEFAULT NULL, + `region` text, + `content` text, + `contentLen` bigint(20) DEFAULT NULL, + `created_at` text, + `type` text, + `detailUrl` text, + `authorAvatar` text, + `authorName` text, + `authorDetail` text, + `isVip` double DEFAULT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- comments表 +-- ---------------------------- +CREATE TABLE `comments` ( + `articleId` bigint(20) DEFAULT NULL, + `created_at` text, + `likes_counts` bigint(20) DEFAULT NULL, + `region` text, + `content` text, + `authorName` text, + `authorGender` text, + `authorAddress` text, + `authorAvatar` text +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + +-- ---------------------------- +-- user表 +-- ---------------------------- +CREATE TABLE `user` ( + `username` varchar(255) DEFAULT NULL, + `password` varchar(255) DEFAULT NULL, + `id` int(11) NOT NULL AUTO_INCREMENT, + `createTime` varchar(255) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; \ No newline at end of file