DOC-004 定义核心数据模型 #4
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
定义以下核心模型(所有支持 serde 序列化):
MaterialType / PreviewMode / DocumentInfo / DocumentBlock / ReadingPosition / ReadingEvent / SearchResult / NoteAnchor / DocumentError
建议文件在 crates/zx_document_core/src/ 下:
material_type.rs / document.rs / blocks.rs / progress.rs / events.rs / search.rs / anchors.rs / error.rs
ReadingPosition 需支持:Markdown、Text、Pdf、Image、Epub
DocumentBlock 需支持:heading、paragraph、list、code、quote、table、image
验收标准:所有核心模型已定义、支持 serde、有基础单元测试
完成项
✅ 所有核心数据模型已定义并编译通过
模型清单
技术细节
待跟进
⬜ 编写单元测试(serde 序列化/反序列化往返测试)
⬜ DOC-005 App ↔ Rust 调用协议
⬜ DOC-101 实现文件类型识别
审查同步 (2026-06-02)
核心数据模型文档已与代码同步:
headers: Vec<String>字段(代码已有,文档漏了)HorizontalRule { id: String }变体(代码已有,文档漏了)