API-INFO-000 P0 | 确认学习信息收集数据源映射 #124

Closed
opened 2026-06-07 11:16:03 +08:00 by wangdl · 1 comment
Owner

目标

明确 API 项目里 material 到底对应哪个实体,避免 ReadingEvent / Progress / Continue 无法 JOIN。

核心决策

materialId = KnowledgeSource.id
knowledgeBaseId = KnowledgeSource.knowledgeBaseId
当前 P0 不支持 materialId 不存在的临时文件事件进入聚合
temporary_file 后续单独设计

字段映射

Rust/iOS API 说明
material_id KnowledgeSource.id 资料唯一标识
KnowledgeSource.knowledgeBaseId 从 source 反查
active_seconds (累计) activeSecondsDelta (增量) iOS 适配层做差值转换

验收标准

  1. 文档写清 materialId 映射
  2. ReadingEvent / MaterialReadingProgress / continue 查询都按 KnowledgeSource.id 实现
  3. materialId 不存在时返回 failed: MATERIAL_NOT_FOUND
## 目标 明确 API 项目里 material 到底对应哪个实体,避免 ReadingEvent / Progress / Continue 无法 JOIN。 ## 核心决策 ```text materialId = KnowledgeSource.id knowledgeBaseId = KnowledgeSource.knowledgeBaseId 当前 P0 不支持 materialId 不存在的临时文件事件进入聚合 temporary_file 后续单独设计 ``` ## 字段映射 | Rust/iOS | API | 说明 | |-----------|-----|------| | material_id | KnowledgeSource.id | 资料唯一标识 | | — | KnowledgeSource.knowledgeBaseId | 从 source 反查 | | active_seconds (累计) | activeSecondsDelta (增量) | iOS 适配层做差值转换 | ## 验收标准 1. 文档写清 materialId 映射 2. ReadingEvent / MaterialReadingProgress / continue 查询都按 KnowledgeSource.id 实现 3. materialId 不存在时返回 failed: MATERIAL_NOT_FOUND
wangdl added this to the M8:学习信息收集与基础分析闭环 milestone 2026-06-07 11:16:03 +08:00
Author
Owner

关闭

被 API-INFO-000 合并(设计文档已在 API-INFO-000 中)

本 issue 已被新版 M8 milestone 规划替代。

## 关闭 被 API-INFO-000 合并(设计文档已在 API-INFO-000 中) 本 issue 已被新版 M8 milestone 规划替代。
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/api-server#124
No description provided.