use anyhow::Result;
use sqlx::PgPool;
use crate::domain::entity::MailGatewayAllowed;
pub const TABLE_NAME: &str = "messaging.mail_gateway_allowed";
pub struct MailGatewayAllowedRepository(
backbone_orm::GenericCrudRepository<MailGatewayAllowed, backbone_orm::SoftDelete>,
);
impl std::ops::Deref for MailGatewayAllowedRepository {
type Target = backbone_orm::GenericCrudRepository<MailGatewayAllowed, backbone_orm::SoftDelete>;
fn deref(&self) -> &Self::Target { &self.0 }
}
impl MailGatewayAllowedRepository {
pub fn new(pool: PgPool) -> Self {
Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
}
}
backbone_core::impl_crud_repository!(MailGatewayAllowedRepository, MailGatewayAllowed, soft_delete);