Skip to main content

koprogo_api/application/ports/
board_alert_repository.rs

1use crate::application::error::AppError;
2use crate::domain::entities::BoardAlert;
3use async_trait::async_trait;
4use uuid::Uuid;
5
6/// Port (interface) pour le repository des alertes du conseil de copropriété
7/// (Story 4.7 / #582).
8#[async_trait]
9pub trait BoardAlertRepository: Send + Sync {
10    /// Crée une nouvelle alerte.
11    async fn create(&self, alert: &BoardAlert) -> Result<BoardAlert, AppError>;
12
13    /// Liste les alertes visibles à une AG donnée (`target_meeting_id`).
14    async fn find_by_target_meeting(&self, meeting_id: Uuid) -> Result<Vec<BoardAlert>, AppError>;
15}