Files
baijiahao_data_crawl/db/ai_statistics_weekly.sql

46 lines
2.0 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Navicat Premium Dump SQL
Source Server : mixue
Source Server Type : MySQL
Source Server Version : 90001 (9.0.1)
Source Host : localhost:3306
Source Schema : ai_article
Target Server Type : MySQL
Target Server Version : 90001 (9.0.1)
File Encoding : 65001
Date: 25/12/2025 14:30:00
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for ai_statistics_weekly
-- ----------------------------
DROP TABLE IF EXISTS `ai_statistics_weekly`;
CREATE TABLE `ai_statistics_weekly` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
`author_id` int NOT NULL DEFAULT 0 COMMENT '作者ID',
`author_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '作者名称',
`channel` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1=baidu|2=toutiao|3=weixin',
`stat_weekly` varchar(2) NOT NULL COMMENT '统计周次格式WW如51表示第51周',
`weekly_revenue` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '当周收益stat_weekly所在自然周的总收益周一至周日',
`revenue_wow_growth_rate` decimal(10, 6) NULL DEFAULT 0.000000 COMMENT '收益周环比增长率((本周收益 - 上周收益) / NULLIF(上周收益, 0)',
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `uk_author_stat_date`(`author_id` ASC, `stat_weekly` ASC) USING BTREE,
INDEX `idx_stat_date`(`stat_weekly` ASC) USING BTREE,
INDEX `idx_author_id`(`author_id` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'AI内容每周核心指标汇总表周粒度数据' ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of ai_statistics_weekly
-- ----------------------------
-- 数据由导入脚本从CSV文件自动导入
SET FOREIGN_KEY_CHECKS = 1;