use rusqlite::{Result, Row};
use crate::FilterId;
use super::hydrate::Hydrate;
#[cfg_attr(test, derive(Debug, PartialEq))]
pub(crate) struct DiffUpdateEntity {
pub(crate) filter_id: FilterId,
pub(crate) next_path: String,
pub(crate) next_check_time: i64,
}
impl Hydrate for DiffUpdateEntity {
fn hydrate(row: &Row) -> Result<DiffUpdateEntity> {
Ok(DiffUpdateEntity {
filter_id: row.get(0)?,
next_path: row.get(1)?,
next_check_time: row.get(2)?,
})
}
}