use crate::error::DbError;
#[derive(Debug, Clone)]
pub struct GraphSummary {
pub id: String,
pub goal: String,
pub status: String,
pub created_at: String,
pub finished_at: Option<String>,
}
#[allow(async_fn_in_trait)]
pub trait RawGraphStore: Send + Sync {
async fn save_graph(
&self,
id: &str,
goal: &str,
status: &str,
graph_json: &str,
created_at: &str,
finished_at: Option<&str>,
) -> Result<(), DbError>;
async fn load_graph(&self, id: &str) -> Result<Option<String>, DbError>;
async fn list_graphs(&self, limit: u32) -> Result<Vec<GraphSummary>, DbError>;
async fn delete_graph(&self, id: &str) -> Result<bool, DbError>;
}