SET NAMES utf8mb4; -- ---------------------------- -- Table structure for hifini_forum -- ---------------------------- DROP TABLE IF EXISTS `hifini_forum`; CREATE TABLE `hifini_forum` ( `forum_id` int(10) UNSIGNED NOT NULL COMMENT 'id', `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL 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 (`forum_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for hifini_tag -- ---------------------------- DROP TABLE IF EXISTS `hifini_tag`; CREATE TABLE `hifini_tag` ( `tag_id` int(10) UNSIGNED NOT NULL, `tag_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL, PRIMARY KEY (`tag_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for hifini_thread -- ---------------------------- DROP TABLE IF EXISTS `hifini_thread`; CREATE TABLE `hifini_thread` ( `thread_id` int(10) UNSIGNED NOT NULL COMMENT 'id', `music_index` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '与id组成联合主键(考虑一个页面包含多首歌的情况)', `forum_id` int(10) UNSIGNED NOT NULL COMMENT '分类id', `title` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '名称', `music_title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', `music_author` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '', `music_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '音乐网址', `music_real_url` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '音乐真实地址', `music_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' 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 (`thread_id`, `music_index`) USING BTREE, INDEX `forum_id`(`forum_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for hifini_thread_tag_relation -- ---------------------------- DROP TABLE IF EXISTS `hifini_thread_tag_relation`; CREATE TABLE `hifini_thread_tag_relation` ( `thread_id` int(10) UNSIGNED NOT NULL, `tag_id` int(10) NOT NULL, PRIMARY KEY (`thread_id`, `tag_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;