重构: df-core改名df-types(类型库语义准+全workspace机械改名54处)

This commit is contained in:
2026-06-17 02:44:34 +08:00
parent a19f535134
commit 4be15912cd
40 changed files with 90 additions and 90 deletions

View File

@@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2021"
[dependencies]
df-core = { path = "../df-core" }
df-types = { path = "../df-types" }
# F-01 阶段1:ModelConfig/deserialize_model_configs 向后兼容反序列化(老字符串数组/新对象数组/null/空)
df-ai-core = { path = "../df-ai-core" }
serde = { workspace = true }

View File

@@ -7,7 +7,7 @@ use std::sync::Arc;
use rusqlite::{params, Connection, OptionalExtension, Row};
use tokio::sync::Mutex;
use df_core::error::{Error, Result};
use df_types::error::{Error, Result};
use crate::db::Database;
use crate::models::{
@@ -16,7 +16,7 @@ use crate::models::{
TaskRecord, WorkflowRecord,
};
/// rusqlite 错误 → df-core `Error::Storage` 统一包装(R-PD-10 DRY,
/// rusqlite 错误 → df-types `Error::Storage` 统一包装(R-PD-10 DRY,
/// 替代散落的 `.map_err(storage_err)`)。
fn storage_err<E: std::string::ToString>(e: E) -> Error {
Error::Storage(e.to_string())
@@ -412,8 +412,8 @@ pub fn is_allowed_column(table: &str, field: &str) -> bool {
// ============================================================
fn now_millis_str() -> String {
// 转发 df_core::now_millis(DRY:时间获取统一入口在 df-core,避免本 crate 与 commands 层各写一份 SystemTime 调用)
df_core::now_millis().to_string()
// 转发 df_types::now_millis(DRY:时间获取统一入口在 df-types,避免本 crate 与 commands 层各写一份 SystemTime 调用)
df_types::now_millis().to_string()
}
// ============================================================