rwadurian/frontend/mining-app/lib/core
hailin 6bca65e434 feat(telemetry): 设备字段提升为顶层结构化列(Amplitude 风格)
将 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>
2026-03-05 09:50:48 -08:00
..
config feat: 2.0 API 域名从 rwaapi.szaiai.com 迁移到 mapi.szaiai.com 2026-02-01 21:58:03 -08:00
constants feat(frontend): 添加全局深色模式支持 2026-01-19 19:08:03 -08:00
di fix(admin): correct distributed shares calculation to use 2M pool 2026-01-16 08:59:46 -08:00
error feat(capability): 实现用户能力权限控制系统(Capability-based Permission) 2026-02-27 22:19:56 -08:00
network feat(trading+app): 预种卖出限制 — 前端 UI 禁用 + 后端查询端点 2026-03-04 05:51:56 -08:00
router feat(mining-app): 完善 telemetry 埋点 - 页面访问 + 用户行为 2026-03-05 09:36:04 -08:00
services feat(notifications): 2.0系统通知弹窗功能(后端+管理端+APP端) 2026-03-02 08:35:16 -08:00
telemetry feat(telemetry): 设备字段提升为顶层结构化列(Amplitude 风格) 2026-03-05 09:50:48 -08:00
updater feat: 2.0 API 域名从 rwaapi.szaiai.com 迁移到 mapi.szaiai.com 2026-02-01 21:58:03 -08:00
utils feat(mining-app): 市场数据3个小数字段显示后端返回的完整精度 2026-03-02 23:58:58 -08:00