2026-04-02 22:29:08 +07:00
|
|
|
use super::event::EventEntity;
|
2026-04-02 13:39:52 +07:00
|
|
|
use async_trait::async_trait;
|
2026-04-02 22:29:08 +07:00
|
|
|
use imphnen_utils::AppError;
|
2026-04-02 13:39:52 +07:00
|
|
|
use paginator_rs::PaginationParams;
|
|
|
|
|
use paginator_utils::PaginatorResponse;
|
|
|
|
|
use uuid::Uuid;
|
|
|
|
|
|
|
|
|
|
#[async_trait]
|
|
|
|
|
pub trait EventRepository: Send + Sync {
|
2026-04-02 22:29:08 +07:00
|
|
|
async fn find_all(
|
|
|
|
|
&self,
|
|
|
|
|
params: PaginationParams,
|
|
|
|
|
) -> Result<PaginatorResponse<EventEntity>, AppError>;
|
|
|
|
|
async fn find_by_id(&self, id: Uuid) -> Result<EventEntity, AppError>;
|
|
|
|
|
async fn create(&self, entity: EventEntity) -> Result<(), AppError>;
|
|
|
|
|
async fn update(&self, entity: EventEntity) -> Result<(), AppError>;
|
|
|
|
|
async fn delete(&self, id: Uuid) -> Result<(), AppError>;
|
2026-04-02 13:39:52 +07:00
|
|
|
}
|