Skip to main content

backbone_accounting/infrastructure/persistence/
bank_check_sequence_repository.rs

1//! Repository for BankCheckSequence entities
2//!
3//! Generated by metaphor-schema. Do not edit manually.
4//!
5//! Thin newtype over `backbone_orm::GenericCrudRepository<BankCheckSequence, backbone_orm::HardDelete>`.
6//! All standard CRUD methods are available via `Deref`.
7
8use anyhow::Result;
9use sqlx::PgPool;
10
11use crate::domain::entity::BankCheckSequence;
12
13/// Table name for BankCheckSequence entities
14pub const TABLE_NAME: &str = "accounting.bank_check_sequences";
15
16/// Repository for BankCheckSequence entities.
17///
18/// All standard CRUD, soft-delete, pagination, and bulk methods are
19/// provided automatically via `Deref` to `backbone_orm::GenericCrudRepository`.
20pub struct BankCheckSequenceRepository(
21    backbone_orm::GenericCrudRepository<BankCheckSequence, backbone_orm::HardDelete>,
22);
23
24impl std::ops::Deref for BankCheckSequenceRepository {
25    type Target = backbone_orm::GenericCrudRepository<BankCheckSequence, backbone_orm::HardDelete>;
26    fn deref(&self) -> &Self::Target { &self.0 }
27}
28
29impl BankCheckSequenceRepository {
30    /// Create a new repository instance.
31    pub fn new(pool: PgPool) -> Self {
32        Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
33    }
34}
35
36backbone_core::impl_crud_repository!(BankCheckSequenceRepository, BankCheckSequence, no_soft_delete);