update
This commit is contained in:
		@@ -60,6 +60,42 @@ CREATE TABLE `lyric` (
 | 
			
		||||
  PRIMARY KEY (`song_id`,`version`)
 | 
			
		||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE `user` (
 | 
			
		||||
  `user_id` int(10) unsigned NOT NULL COMMENT '用户id',
 | 
			
		||||
  `user_type` tinyint(4) unsigned NOT NULL COMMENT '用户类型',
 | 
			
		||||
  `nickname` varchar(200) NOT NULL COMMENT '用户昵称',
 | 
			
		||||
  `avatar_url` varchar(200) NOT NULL COMMENT '用户头像 http://p1.music.126.net/ 后面的部分',
 | 
			
		||||
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
 | 
			
		||||
  `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
 | 
			
		||||
  PRIMARY KEY (`user_id`)
 | 
			
		||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE `comment` (
 | 
			
		||||
  `comment_id` bigint(20) unsigned NOT NULL COMMENT '评论id',
 | 
			
		||||
  `parent_comment_id` int(10) unsigned NOT NULL COMMENT '父评论id',
 | 
			
		||||
  `user_id` int(10) unsigned NOT NULL COMMENT '用户id',
 | 
			
		||||
  `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id',
 | 
			
		||||
  `content` text NOT NULL COMMENT '评论内容',
 | 
			
		||||
  `time` varchar(50) NOT NULL DEFAULT '' COMMENT '评论时间',
 | 
			
		||||
  `like_count` int(10) unsigned NOT NULL COMMENT '点赞数',
 | 
			
		||||
  `comment_type` tinyint(4) unsigned NOT NULL COMMENT '评论类型 0-comments 1-hotComments 2-topComments',
 | 
			
		||||
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
 | 
			
		||||
  `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
 | 
			
		||||
  PRIMARY KEY (`comment_id`)
 | 
			
		||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE `comment_progress` (
 | 
			
		||||
  `song_id` int(10) unsigned NOT NULL COMMENT '歌曲id',
 | 
			
		||||
  `max_time` int(10) NOT NULL DEFAULT 0 COMMENT '开始爬取/开始增量爬取的时候 最新一条评论的时间',
 | 
			
		||||
  `min_time` int(10) NOT NULL DEFAULT 0 COMMENT '上一次爬取时最后一条评论的时间 第一次爬取时为0',
 | 
			
		||||
  `current_time` int(10) NOT NULL DEFAULT 0 COMMENT '本次爬取/增量时,最早的一条评论时间',
 | 
			
		||||
  `current_status` tinyint(4) unsigned NOT NULL DEFAULT 0 COMMENT '爬取进度 0-等待爬取/增量爬取 1-爬取中 2-完成',
 | 
			
		||||
  `total` int(10) NOT NULL DEFAULT 0 COMMENT '评论总数',
 | 
			
		||||
  `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '爬取时间',
 | 
			
		||||
  `modify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
 | 
			
		||||
  PRIMARY KEY (`song_id`)
 | 
			
		||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
 | 
			
		||||
 | 
			
		||||
CREATE TABLE `log` (
 | 
			
		||||
  `id` int(10) unsigned NOT NULL COMMENT 'id',
 | 
			
		||||
  `name` varchar(200) NOT NULL COMMENT '方法/数据库',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user