pub trait BoardMemberRepository: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_expiring_soon<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
days_threshold: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_owner_and_building<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn has_active_mandate<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn count_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Port (interface) pour le repository des membres du conseil de copropriété
Required Methods§
Sourcefn create<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Crée un nouveau membre du conseil
Sourcefn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve un membre du conseil par son ID
Sourcefn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve tous les membres du conseil d’un immeuble
Sourcefn find_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_active_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve tous les membres du conseil actifs d’un immeuble (mandats non expirés à la date actuelle)
Sourcefn find_expiring_soon<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
days_threshold: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_expiring_soon<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
days_threshold: i32,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve les membres du conseil dont le mandat expire bientôt (< 60 jours)
Sourcefn find_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve tous les mandats d’un copropriétaire (historique complet)
Sourcefn find_by_owner_and_building<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_owner_and_building<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<BoardMember>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Trouve le mandat d’un copropriétaire pour un immeuble spécifique (actif ou non)
Sourcefn has_active_mandate<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn has_active_mandate<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<bool, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vérifie si un copropriétaire a un mandat actif pour un immeuble donné
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
board_member: &'life1 BoardMember,
) -> Pin<Box<dyn Future<Output = Result<BoardMember, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Met à jour un membre du conseil (pour renouvellement de mandat)