backbone-accounting 0.9.27

GL, journals, ledger, reconciliation (extracted from bersihir)
Documentation
//! Repository for PrintedCheck entities
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Thin newtype over `backbone_orm::GenericCrudRepository<PrintedCheck, backbone_orm::HardDelete>`.
//! All standard CRUD methods are available via `Deref`.

use anyhow::Result;
use sqlx::PgPool;

use crate::domain::entity::PrintedCheck;

/// Table name for PrintedCheck entities
pub const TABLE_NAME: &str = "accounting.printed_checks";

/// Repository for PrintedCheck entities.
///
/// All standard CRUD, soft-delete, pagination, and bulk methods are
/// provided automatically via `Deref` to `backbone_orm::GenericCrudRepository`.
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 {
    /// Create a new repository instance.
    pub fn new(pool: PgPool) -> Self {
        Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
    }
}

backbone_core::impl_crud_repository!(PrintedCheckRepository, PrintedCheck, no_soft_delete);