use anyhow::Result;
use async_trait::async_trait;
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CheckpointID {
pub database_type: String,
pub phase: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct StoredCheckpoint {
pub checkpoint_data: String,
pub database_type: String,
pub phase: String,
pub created_at: DateTime<Utc>,
}
#[async_trait]
pub trait CheckpointStore: Send + Sync {
async fn store_checkpoint(&self, id: &CheckpointID, checkpoint_data: String) -> Result<()>;
async fn read_checkpoint(&self, id: &CheckpointID) -> Result<Option<StoredCheckpoint>>;
}