use anyhow::Result;
use sqlx::PgPool;
use crate::domain::entity::PrintedCheck;
pub const TABLE_NAME: &str = "accounting.printed_checks";
pub struct PrintedCheckRepository(
backbone_orm::GenericCrudRepository<PrintedCheck, backbone_orm::HardDelete>,
);
impl std::ops::Deref for PrintedCheckRepository {
type Target = backbone_orm::GenericCrudRepository<PrintedCheck, backbone_orm::HardDelete>;
fn deref(&self) -> &Self::Target { &self.0 }
}
impl PrintedCheckRepository {
pub fn new(pool: PgPool) -> Self {
Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
}
}
backbone_core::impl_crud_repository!(PrintedCheckRepository, PrintedCheck, no_soft_delete);