backbone_bucket/infrastructure/persistence/
processing_job_repository.rs1use anyhow::Result;
9use sqlx::PgPool;
10
11use crate::domain::entity::ProcessingJob;
12
13pub const TABLE_NAME: &str = "bucket.processing_jobs";
15
16pub struct ProcessingJobRepository(
21 backbone_orm::GenericCrudRepository<ProcessingJob, backbone_orm::SoftDelete>,
22);
23
24impl std::ops::Deref for ProcessingJobRepository {
25 type Target = backbone_orm::GenericCrudRepository<ProcessingJob, backbone_orm::SoftDelete>;
26 fn deref(&self) -> &Self::Target { &self.0 }
27}
28
29impl ProcessingJobRepository {
30 pub fn new(pool: PgPool) -> Self {
32 Self(backbone_orm::GenericCrudRepository::new(pool, TABLE_NAME))
33 }
34}
35
36backbone_core::impl_crud_repository!(ProcessingJobRepository, ProcessingJob, soft_delete);