forked from NacedWang/163MusicSpider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.sql
46 lines (40 loc) · 1.23 KB
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
-- 歌手表
CREATE TABLE `artists` (
`artist_id` bigint(20) NOT NULL,
`artist_name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`artist_id`),
KEY `unique_id` (`artist_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 专辑表
CREATE TABLE `albums` (
`album_id` bigint(20) NOT NULL,
`artist_id` bigint(20) NOT NULL,
`title` varchar(255) DEFAULT NULL,
`img` varchar(255) DEFAULT NULL,
PRIMARY KEY (`album_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 音乐表
CREATE TABLE `musics` (
`music_id` int(20) NOT NULL,
`music_name` varchar(255) DEFAULT NULL,
`album_id` int(20) NOT NULL,
PRIMARY KEY (`music_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 评论表
CREATE TABLE `comments` (
`comment_id` bigint(20) NOT NULL,
`music_id` bigint(20) DEFAULT NULL,
`content` varchar(255) DEFAULT NULL,
`liked_count` int(10) DEFAULT NULL,
`time` bigint(20) DEFAULT NULL,
`user_id` bigint(20) DEFAULT NULL,
`nickname` varchar(255) DEFAULT NULL,
`user_img` varchar(255) DEFAULT NULL,
PRIMARY KEY (`comment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- 歌词表
CREATE TABLE `lyrics` (
`music_id` bigint(20) NOT NULL,
`lyric` text DEFAULT NULL,
PRIMARY KEY (`music_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;