IOS-INFO-002 P0 | 定义 ReadingEventUploadItem / API DTO 【审计: 不存在】 #68

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

ReadingEventUploadItem+Codable。eventId/clientSessionId/readingTargetType/materialId/eventType/position/activeSecondsDelta/clientTimestampMs/clientTimezoneOffsetMinutes/sequence/platform/appVersion。eventType snake_case。position camelCase。不包含 userId/knowledgeBaseId。

M-IOS-INFO 里程碑 issue。

## ReadingEventUploadItem+Codable。eventId/clientSessionId/readingTargetType/materialId/eventType/position/activeSecondsDelta/clientTimestampMs/clientTimezoneOffsetMinutes/sequence/platform/appVersion。eventType snake_case。position camelCase。不包含 userId/knowledgeBaseId。 M-IOS-INFO 里程碑 issue。
wangdl added this to the M-IOS-INFO:学习信息采集、上传、继续学习与基础分析闭环 milestone 2026-06-07 11:55:21 +08:00
wangdl changed title from IOS-INFO-002 P0 | 定义 ReadingEventUploadItem / API DTO to IOS-INFO-002 P0 | 定义 ReadingEventUploadItem / API DTO 【审计: 不存在】 2026-06-07 12:21:24 +08:00
Author
Owner

完成报告

交付

Core/Models/ReadingEventUploadItem.swift:

struct ReadingEventUploadItem: Codable, Equatable {
    // ── From Rust ReadingEventV2 ──
    let eventId: String              // UUID
    let clientSessionId: String      // UUID
    let materialId: String
    let eventType: String            // snake_case
    let position: ReadingPosition?   // camelCase
    let activeSecondsDelta: Int      // 增量,非累计
    let clientTimestampMs: Int64
    let sequence: UInt64

    // ── iOS supplements ──
    let readingTargetType: String    // knowledge_source | temporary_file
    let platform: String             // "ios"
    let appVersion: String
    let clientTimezoneOffsetMinutes: Int
}

struct ReadingEventBatchRequest: Codable {
    let events: [ReadingEventUploadItem]
}

struct ReadingEventBatchResponse: Codable {
    let processed: Int
    let duplicate: Int
    let failed: Int
    let warnings: [WarningItem]?
}
## 完成报告 ### 交付 `Core/Models/ReadingEventUploadItem.swift`: ```swift struct ReadingEventUploadItem: Codable, Equatable { // ── From Rust ReadingEventV2 ── let eventId: String // UUID let clientSessionId: String // UUID let materialId: String let eventType: String // snake_case let position: ReadingPosition? // camelCase let activeSecondsDelta: Int // 增量,非累计 let clientTimestampMs: Int64 let sequence: UInt64 // ── iOS supplements ── let readingTargetType: String // knowledge_source | temporary_file let platform: String // "ios" let appVersion: String let clientTimezoneOffsetMinutes: Int } struct ReadingEventBatchRequest: Codable { let events: [ReadingEventUploadItem] } struct ReadingEventBatchResponse: Codable { let processed: Int let duplicate: Int let failed: Int let warnings: [WarningItem]? } ```
Sign in to join this conversation.
No description provided.