Files
MBTI_wang/api/database/migrations/add_mp_analytics_events.sql
卡若 aca2e263bb feat: 管理端聚合页、小程序/抖音埋点与统计、飞书线索 webhook、API 迁移与路由
- admin:OrdersHub/UsersHub、Commerce/Ops/Enterprise Hub、MpAnalytics、Feishu/小程序配置面板、鉴权存储
- api:Analytics、DataMigration、FeishuLeadWebhook、mp 事件迁移 SQL
- 微信/抖音小程序:analytics 上报与相关页面调整
- 开发文档与 scripts 补充

Made-with: Cursor
2026-03-27 17:22:04 +08:00

16 lines
879 B
SQL
Raw 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.

-- 小程序埋点表(与 mbti_ 表前缀一致;若 .env 中 DATABASE_PREFIX 不同,请同步改表名)
-- ThinkPHPDb::name('analytics_events') + 前缀 mbti_ => mbti_analytics_events
CREATE TABLE IF NOT EXISTS `mbti_analytics_events` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`userId` int(10) unsigned DEFAULT NULL COMMENT 'wechat_users.id',
`openid` varchar(64) DEFAULT NULL,
`eventName` varchar(128) NOT NULL DEFAULT '',
`pagePath` varchar(255) DEFAULT NULL,
`propsJson` text COMMENT 'JSON 字符串',
`clientTs` bigint(20) DEFAULT NULL COMMENT '客户端毫秒时间戳',
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_event_created` (`eventName`,`createdAt`),
KEY `idx_created` (`createdAt`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='小程序行为埋点';