//! All logic for snapshots.
use {
color_eyre::Result,
sea_orm::{prelude::*, QueryOrder},
};
mod create;
pub use crate::entities::snapshot::{
ActiveModel as SnapshotActiveModel, Column as SnapshotColumn,
Entity as SnapshotEntity, Model as SnapshotModel,
};
impl SnapshotModel {
/// Get a snapshot for a given date.
pub async fn get_by_date(
db: &DatabaseConnection,
date: ChronoDate,
) -> Result