use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use thiserror::Error;
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct LockEntry {
pub id: String,
pub sha: String,
pub branch: String,
pub installed_at: DateTime<Utc>,
pub actions_hash: String,
pub schema_version: String,
}
#[derive(Debug, Error)]
pub enum LockfileError {
#[error("lockfile i/o error: {0}")]
Io(#[from] std::io::Error),
#[error("lockfile corrupted at line {line}: {source}")]
Corruption {
line: usize,
#[source]
source: serde_json::Error,
},
#[error("lockfile serialize error: {0}")]
Serialize(serde_json::Error),
}