将 device_brand/device_model/device_os/app_version/locale 从 JSONB properties 提升为 analytics_event_log 表的独立列,并建立索引,支持亿级数据量下的高效 按设备维度查询和分组统计。 前端 (mining-app + mobile-app): - toServerJson() 从 properties 中提取设备字段,以顶层字段发送给服务端 - 本地存储格式不变(properties 仍保留设备字段,便于离线队列完整性) 后端 (presence-service): - Prisma schema: EventLog 新增 deviceBrand/deviceModel/deviceOs/appVersion/locale 列 - Migration: ALTER TABLE 添加 5 列 + 2 个索引 - DTO/Command: EventItemDto 接收顶层设备字段 - Entity: EventLog 新增 5 个字段及 getter - Mapper: toDomain/toPersistence 映射新字段 - Handler: toEventLog 从 DTO 读取设备字段;SessionStartedEvent 优先使用顶层字段 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| core | ||
| features | ||
| routes | ||
| app.dart | ||
| bootstrap.dart | ||
| main.dart | ||