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