BoardMemberRepository

Trait BoardMemberRepository 

Source
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§

Source

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

Source

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

Source

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

Source

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)

Source

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)

Source

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)

Source

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)

Source

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é

Source

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)

Source

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,

Supprime un membre du conseil (fin de mandat anticipée)

Source

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,

Compte le nombre de membres actifs du conseil pour un immeuble

Implementors§