koprogo_api/application/ports/
ag_session_repository.rs

1use crate::domain::entities::ag_session::AgSession;
2use async_trait::async_trait;
3use uuid::Uuid;
4
5/// Port (interface) pour le repository des sessions AG visioconférence
6#[async_trait]
7pub trait AgSessionRepository: Send + Sync {
8    async fn create(&self, session: &AgSession) -> Result<AgSession, String>;
9    async fn find_by_id(&self, id: Uuid) -> Result<Option<AgSession>, String>;
10    async fn find_by_meeting_id(&self, meeting_id: Uuid) -> Result<Option<AgSession>, String>;
11    async fn find_by_organization(&self, organization_id: Uuid) -> Result<Vec<AgSession>, String>;
12    async fn update(&self, session: &AgSession) -> Result<AgSession, String>;
13    async fn delete(&self, id: Uuid) -> Result<bool, String>;
14    /// Trouve les sessions planifiées dont la date de début est passée (à démarrer)
15    async fn find_pending_start(&self) -> Result<Vec<AgSession>, String>;
16}