This commit is contained in:
777
2025-10-14 18:53:24 +08:00
parent 63df93fc36
commit db5293247e
2 changed files with 61 additions and 1 deletions

60
doc/20251014.sql Normal file
View File

@@ -0,0 +1,60 @@
APP人数
+
24
1/
7 3/
15
CREATE TABLE `cai_ops_count`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`count_date` date not null comment '时间',
`user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '总人数',
`women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '男用户',
`man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '女用户',
`register_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册人数',
`register_women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册女用户',
`register_man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '注册男用户',
`active_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃人数',
`active_women_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃女人数',
`active_man_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '活跃男人数',
`pay_price` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '充值金额(不含VIP)',
`pay_order_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '充值笔数(不含VIP)',
`pay_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '今日充值人数',
`first_pay_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '今日首充人数',
`more_user_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '复充人数',
`first_user_pay_num` bigint(20) NOT NULL DEFAULT 0 COMMENT '新用户首充人数',
`day2_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '次日留存率(男用户)',
`day3_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '3日留存率男用户',
`day4_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '4日留存率男用户',
`day5_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '5日留存率男用户',
`day6_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '6日留存率男用户',
`day7_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '7日留存率男用户',
`day15_retention_rate` decimal(20, 2) NOT NULL DEFAULT 0 COMMENT '15日留存率男用户',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_sys_tm` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_date` (`count_date`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='统计数据';
CREATE TABLE `cai_login_min_log`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`login_date` date not null comment '登录时间',
`user_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_date` (`user_id`, `login_date`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='用户登录记录';