Files
cai-server/doc/20250926.sql
2025-09-26 15:40:59 +08:00

22 lines
1.0 KiB
SQL

ALTER TABLE cai_anchor
ADD COLUMN `anchor_total_coin` bigint(20) default 0 COMMENT '主播总收入';
CREATE TABLE `cai_love_rank_today`
(
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`data_type` tinyint NOT NULL default 2 COMMENT '日期类型 1-日榜 2-周榜 3-月榜',
`rank_time` date not null comment '榜单期数',
`begin_rank_time` date null comment '开始时间',
`end_rank_time` date null comment '结束时间',
`num` bigint(20) NOT NULL DEFAULT 0 COMMENT '数值',
`user_id` bigint(20) not null comment '用户ID',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_date` (`rank_time`, `num`) USING BTREE,
INDEX `idx_user_id` (`user_id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 1
DEFAULT CHARSET = utf8mb4
COLLATE = utf8mb4_general_ci
ROW_FORMAT = DYNAMIC COMMENT ='魅力榜单实时数据';