/*
 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: 16/12/2025 11:29:17
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for ai_statistics_days
-- ----------------------------
DROP TABLE IF EXISTS `ai_statistics_days`;
CREATE TABLE `ai_statistics_days`  (
  `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_date` date NOT NULL COMMENT '统计日期（自然日）',
  `daily_published_count` int NULL DEFAULT 0 COMMENT '单日发文量',
  `cumulative_published_count` int NULL DEFAULT 0 COMMENT '累计发文量（从起始日到stat_date的总和）',
  `monthly_revenue` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '当月收益（stat_date所在自然月的总收益）',
  `weekly_revenue` decimal(18, 2) NULL DEFAULT 0.00 COMMENT '当周收益（stat_date所在自然周的总收益，周一至周日）',
  `revenue_mom_growth_rate` decimal(10, 6) NULL DEFAULT 0.000000 COMMENT '收益月环比增长率（(本月收益 - 上月收益) / NULLIF(上月收益, 0)）',
  `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_stat_date`(`stat_date` ASC) USING BTREE,
  INDEX `idx_stat_date`(`stat_date` ASC) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 51 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'AI内容每日核心指标汇总表（含累计、收益及环比）' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of ai_statistics_days
-- ----------------------------
INSERT INTO `ai_statistics_days` VALUES (1, 129, '梁金宇医生', 1, '2025-10-28', 27, 27, 198.44, 198.44, 0.000000, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (2, 127, '黄燕飞医生', 1, '2025-10-29', 6, 33, 382.29, 382.29, 0.000000, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (3, 151, '皮肤科赵鹏', 1, '2025-10-30', 30, 63, 1317.62, 1317.62, 0.000000, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (4, 132, '石爱真医生', 1, '2025-10-31', 22, 85, 1435.84, 1435.84, 0.000000, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (5, 211, '中医王倚东', 1, '2025-11-01', 27, 112, 116.15, 1551.99, -0.919107, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (6, 176, '武娜中医', 1, '2025-11-02', 11, 123, 1025.18, 2461.02, -0.286007, 0.000000, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (7, 193, '血管外科钟若雷', 1, '2025-11-03', 6, 129, 1462.23, 437.05, 0.018379, -0.822411, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (8, 104, '男科医生刘德风', 1, '2025-11-04', 5, 134, 2050.55, 1025.37, 0.428119, -0.583356, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (9, 175, '静脉曲张的杀手医生', 1, '2025-11-05', 12, 146, 3004.99, 1979.81, 1.092845, -0.195533, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (10, 202, '整形外科侯丽平', 1, '2025-11-06', 26, 172, 3260.49, 2235.31, 1.270789, -0.091714, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (11, 117, '唐小明医生', 1, '2025-11-07', 13, 185, 4064.21, 3039.03, 1.830545, 0.234866, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (12, 214, '传海2018', 1, '2025-11-08', 12, 197, 4961.73, 3936.55, 2.455629, 0.599560, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (13, 170, '任志宏中医', 1, '2025-11-09', 18, 215, 5160.70, 4135.52, 2.594203, 0.680409, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (14, 179, '风湿免疫专家李小峰', 1, '2025-11-10', 18, 233, 5794.59, 633.89, 3.035679, -0.846721, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (15, 202, '整形外科侯丽平', 1, '2025-11-11', 14, 247, 6673.98, 1513.28, 3.648136, -0.634077, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (16, 203, '中医针灸侯医生', 1, '2025-11-12', 19, 266, 7412.32, 2251.62, 4.162358, -0.455541, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (17, 217, '中医杨志杰', 1, '2025-11-13', 24, 290, 7641.13, 2480.43, 4.321714, -0.400213, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (18, 115, '冯玉燕医生', 1, '2025-11-14', 25, 315, 8384.03, 3223.33, 4.839112, -0.220574, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (19, 184, '耳鼻喉科贾闯医生', 1, '2025-11-15', 22, 337, 9067.99, 3907.29, 5.315460, -0.055188, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (20, 131, '骆小辉副主任医师', 1, '2025-11-16', 14, 351, 9538.20, 4377.50, 5.642941, 0.058513, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (21, 130, '妇产科许春艳', 1, '2025-11-17', 9, 360, 9827.47, 289.27, 5.844405, -0.933919, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (22, 211, '中医王倚东', 1, '2025-11-18', 19, 379, 10482.77, 944.57, 6.300793, -0.784222, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (23, 201, '面部提升梁永鑫', 1, '2025-11-19', 22, 401, 11126.90, 1588.70, 6.749401, -0.637076, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (24, 181, '针灸科高小勇医生', 1, '2025-11-20', 8, 409, 11849.59, 2311.39, 7.252723, -0.471984, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (25, 122, '高丽娜中医', 1, '2025-11-21', 6, 415, 12167.82, 2629.62, 7.474356, -0.399287, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (26, 105, '抗衰孟大夫', 1, '2025-11-22', 29, 444, 12921.45, 3383.25, 7.999227, -0.227127, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (27, 111, '赖婷医生', 1, '2025-11-23', 13, 457, 13852.86, 4314.66, 8.647913, -0.014355, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (28, 214, '传海2018', 1, '2025-11-24', 23, 480, 14590.97, 738.11, 9.161975, -0.828930, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (29, 226, '中医李伟杰', 1, '2025-11-25', 27, 507, 14899.04, 1046.18, 9.376532, -0.757529, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (30, 180, '尹海琴医生', 1, '2025-11-26', 26, 533, 15860.20, 2007.34, 10.045938, -0.534763, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (31, 136, '普外科马春雷', 1, '2025-11-27', 15, 548, 16177.26, 2324.40, 10.266757, -0.461279, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (32, 241, '测试作者_更新', 1, '2025-11-28', 8, 556, 16606.60, 2753.74, 10.565773, -0.361771, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (33, 153, '曹凤娇中医', 1, '2025-11-29', 24, 580, 16946.60, 3093.74, 10.802569, -0.282970, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (34, 175, '静脉曲张的杀手医生', 1, '2025-11-30', 20, 600, 17569.87, 3717.01, 11.236649, -0.138516, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (35, 173, '赵剑锋医生', 1, '2025-12-01', 15, 615, 687.78, 687.78, -0.960855, -0.814964, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (36, 196, '血管外科阿力木', 1, '2025-12-02', 22, 637, 1298.68, 1298.68, -0.926085, -0.650612, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (37, 248, '百胜号', 2, '2025-12-03', 7, 644, 1620.63, 1620.63, -0.907761, -0.563996, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (38, 185, '郭俊恒中医', 1, '2025-12-04', 18, 662, 2172.80, 2172.80, -0.876334, -0.415444, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (39, 104, '男科医生刘德风', 1, '2025-12-05', 18, 680, 2813.87, 2813.87, -0.839847, -0.242975, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (40, 214, '传海2018', 1, '2025-12-06', 15, 695, 3393.18, 3393.18, -0.806875, -0.087121, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (41, 245, '文龙号', 2, '2025-12-07', 20, 715, 4382.30, 4382.30, -0.750579, 0.178985, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (42, 198, '拇外翻医生李昕宇', 1, '2025-12-08', 5, 720, 4487.00, 104.70, -0.744620, -0.976108, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (43, 175, '静脉曲张的杀手医生', 1, '2025-12-09', 16, 736, 4628.11, 245.81, -0.736588, -0.943908, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (44, 110, '白凌文医生', 1, '2025-12-10', 10, 746, 5393.95, 1011.65, -0.693000, -0.769151, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (45, 141, '耳鼻喉科杨书勋医生', 1, '2025-12-11', 7, 753, 5897.48, 1515.18, -0.664341, -0.654250, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (46, 226, '中医李伟杰', 1, '2025-12-12', 11, 764, 6830.48, 2448.18, -0.611239, -0.441348, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (47, 183, '杜晋芳中医', 1, '2025-12-13', 22, 786, 7500.72, 3118.42, -0.573092, -0.288406, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (48, 192, '整形医生路会', 1, '2025-12-14', 26, 812, 7738.47, 3356.17, -0.559560, -0.234153, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (49, 146, 'Dr蓝剑雄', 1, '2025-12-15', 12, 824, 8072.01, 333.54, -0.540577, -0.900619, '2025-12-16 10:53:58', '2025-12-16 11:28:19');
INSERT INTO `ai_statistics_days` VALUES (50, 241, '测试作者_更新', 1, '2025-12-16', 14, 838, 8548.49, 810.02, -0.513457, -0.758648, '2025-12-16 10:53:58', '2025-12-16 11:28:19');

SET FOREIGN_KEY_CHECKS = 1;
