31 lines
2.0 KiB
SQL
31 lines
2.0 KiB
SQL
-- SQL table definition
|
|
-- Generated from splitting a larger SQL file
|
|
-- Table: ai_statistics_day
|
|
--
|
|
|
|
CREATE TABLE `ai_statistics_day` (
|
|
`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 DEFAULT NULL COMMENT '作者名称',
|
|
`channel` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1=baidu|2=toutiao|3=weixin',
|
|
`stat_date` date NOT NULL COMMENT '统计日期(天)',
|
|
`total_submission_count` int DEFAULT '0' COMMENT '投稿量(当日总计)',
|
|
`total_read_count` int DEFAULT '0' COMMENT '阅读量(当日总计)',
|
|
`total_comment_count` int DEFAULT '0' COMMENT '评论量(当日总计)',
|
|
`total_like_count` int DEFAULT '0' COMMENT '点赞量(当日总计)',
|
|
`total_favorite_count` int DEFAULT '0' COMMENT '收藏量(当日总计)',
|
|
`total_share_count` int DEFAULT '0' COMMENT '分享量(当日总计)',
|
|
`avg_comment_rate` decimal(5,4) DEFAULT '0.0000' COMMENT '评论率(当日平均)',
|
|
`avg_like_rate` decimal(5,4) DEFAULT '0.0000' COMMENT '点赞率(当日平均)',
|
|
`avg_favorite_rate` decimal(5,4) DEFAULT '0.0000' COMMENT '收藏率(当日平均)',
|
|
`avg_share_rate` decimal(5,4) DEFAULT '0.0000' COMMENT '分享率(当日平均)',
|
|
`avg_slide_ratio` decimal(5,4) DEFAULT '0.0000' COMMENT '滑图占比(当日平均)',
|
|
`total_baidu_search_volume` int DEFAULT '0' COMMENT '百度搜索量(当日总计)',
|
|
`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 KEY `uk_stat_date` (`stat_date`,`author_id`) USING BTREE,
|
|
KEY `idx_stat_date` (`stat_date`) USING BTREE,
|
|
KEY `idx_author_id` (`author_id`)
|
|
) ENGINE=InnoDB AUTO_INCREMENT=41142 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=DYNAMIC COMMENT='AI内容每日汇总统计表';
|