IOS-INFO-012:Rust Event → UploadItem 映射 #120

Open
opened 2026-06-10 21:28:12 +08:00 by wangdl · 0 comments
Owner

目标

将 Rust ReadingEvent V2 映射为 API ReadingEventUploadItem。

依赖说明

  1. 映射依赖 Runtime ReadingEvent V2 输出格式。
  2. UploadItem 中 platform / appVersion / clientTimezoneOffsetMinutes 来自 AppContext。
  3. AppContext 由 IOS-INFO-038 提供。
  4. readingTargetType / knowledgeBaseId 来自 ReadingMaterialContext。

映射表

  • Rust eventId → UploadItem.eventId
  • Rust clientSessionId → UploadItem.clientSessionId
  • Rust materialId → UploadItem.materialId
  • Context readingTargetType → UploadItem.readingTargetType
  • Context knowledgeBaseId → UploadItem.knowledgeBaseId
  • Rust eventType → UploadItem.eventType
  • Rust position → UploadItem.position
  • Rust activeSecondsDelta → UploadItem.activeSecondsDelta
  • Rust timestampMs → UploadItem.clientTimestamp
  • Rust sequence → UploadItem.sequence
  • AppContext platform → UploadItem.platform
  • AppContext appVersion → UploadItem.appVersion
  • AppContext timezone → UploadItem.clientTimezoneOffsetMinutes

验收标准

  1. 所有字段映射完整。
  2. Rust 不提供的业务字段由 ReadingMaterialContext / AppContext 补充。
  3. timestampMs 转 Date 正确。
  4. timezone offset 正确。
  5. position 保持 camelCase。
  6. 缺少 required 字段时映射失败并记录。
  7. 有映射测试。
## 目标 将 Rust ReadingEvent V2 映射为 API ReadingEventUploadItem。 ## 依赖说明 1. 映射依赖 Runtime ReadingEvent V2 输出格式。 2. UploadItem 中 platform / appVersion / clientTimezoneOffsetMinutes 来自 AppContext。 3. AppContext 由 IOS-INFO-038 提供。 4. readingTargetType / knowledgeBaseId 来自 ReadingMaterialContext。 ## 映射表 - Rust eventId → UploadItem.eventId - Rust clientSessionId → UploadItem.clientSessionId - Rust materialId → UploadItem.materialId - Context readingTargetType → UploadItem.readingTargetType - Context knowledgeBaseId → UploadItem.knowledgeBaseId - Rust eventType → UploadItem.eventType - Rust position → UploadItem.position - Rust activeSecondsDelta → UploadItem.activeSecondsDelta - Rust timestampMs → UploadItem.clientTimestamp - Rust sequence → UploadItem.sequence - AppContext platform → UploadItem.platform - AppContext appVersion → UploadItem.appVersion - AppContext timezone → UploadItem.clientTimezoneOffsetMinutes ## 验收标准 1. 所有字段映射完整。 2. Rust 不提供的业务字段由 ReadingMaterialContext / AppContext 补充。 3. timestampMs 转 Date 正确。 4. timezone offset 正确。 5. position 保持 camelCase。 6. 缺少 required 字段时映射失败并记录。 7. 有映射测试。
wangdl added this to the M-IOS-INFO:学习信息采集、上传、继续学习与基础分析闭环 milestone 2026-06-10 21:28:12 +08:00
wangdl added the
blocked-by:doc-runtime
label 2026-06-10 22:15:58 +08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wangdl/ios-projects#120
No description provided.