Files
DevFlow/docs/03-模块文档/df-storage-存储层.md
绝尘 98393b4908 新增: 初始化 DevFlow 项目仓库
Tauri 2 + Vue 3 + Vite 6 桌面应用,Rust workspace 含 13 个 crate
(df-ai / df-storage / df-workflow / df-core / df-execute 等)。
核心能力:AI 聊天 agentic 循环(工具调用+人工审批)、工作流引擎、
任务/想法/项目/阶段管理、可追溯性,及配套前端组件。
2026-06-12 01:31:05 +08:00

54 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# df-storage 存储层
> 创建: 2026-06-10 | 状态: 初稿
---
## 概述
df-storage 是 DevFlow 的数据持久化层,基于 SQLite (rusqlite)负责连接管理、Schema 迁移和 CRUD 操作。
## 当前状态
| 功能 | 状态 |
|------|------|
| SQLite 连接管理 | ✅ 已实现 |
| Schema 迁移 (6 张表) | ✅ 已实现 |
| CRUD 操作 | ⬜ 待实施 |
| 事务支持 | ⬜ 待实施 |
## 数据表
Phase 1 已创建的 6 张核心表:
1. **ideas** — 想法池
2. **projects** — 项目
3. **tasks** — 任务
4. **workflow_defs** — 工作流定义
5. **workflow_runs** — 工作流执行
6. **artifacts** — 产出物
完整表结构见 `ARCHITECTURE.md` 数据模型章节。
## 依赖关系
```
df-core (错误类型、ID 生成)
← df-storage
```
## 文件结构
```
crates/df-storage/src/
├── lib.rs — 模块入口,导出公共 API
├── connection.rs — SQLite 连接管理
├── schema.rs — Schema 定义与迁移
└── crud.rs — CRUD 操作 (待创建)
```
## 相关文档
- [SQLite CRUD 模式](../01-技术文档/SQLite-CRUD模式.md)
- [前后端类型对齐](../02-架构设计/前后端类型对齐.md)