backbone-digest 0.3.0

KPI digests — the periodic KPI-email engine: a declarative name-keyed KPI registry other modules extend, per-recipient fenced rendering with declared (never row-count) KPI drops, the anti-spam slowdown ladder, a shared tips carousel, and a daily plain-pull cron whose due-date column is the queue (Odoo digest port)
//! Repository for DigestDigestKpi entities
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Thin newtype over `backbone_orm::GenericCrudRepository<DigestDigestKpi, backbone_orm::SoftDelete>`.
//! All standard CRUD methods are available via `Deref`.

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

use crate::domain::entity::DigestDigestKpi;

/// Table name for DigestDigestKpi entities
pub const TABLE_NAME: &str = "digest.digest_digest_kpis";

/// Repository for DigestDigestKpi entities.
///
/// All standard CRUD, soft-delete, pagination, and bulk methods are
/// provided automatically via `Deref` to `backbone_orm::GenericCrudRepository`.
pub struct DigestDigestKpiRepository(
    backbone_orm::GenericCrudRepository<DigestDigestKpi, backbone_orm::SoftDelete>,
);

impl std::ops::Deref for DigestDigestKpiRepository {
    type Target = backbone_orm::GenericCrudRepository<DigestDigestKpi, backbone_orm::SoftDelete>;
    fn deref(&self) -> &Self::Target { &self.0 }
}

impl DigestDigestKpiRepository {
    /// Create a new repository instance.
    pub fn new(pool: PgPool) -> Self {
        Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
    }
}

backbone_core::impl_crud_repository!(DigestDigestKpiRepository, DigestDigestKpi, soft_delete);