StatsRepository

Trait StatsRepository 

Source
pub trait StatsRepository: Send + Sync {
    // Required methods
    fn get_admin_dashboard_stats<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<AdminDashboardStats, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_seed_data_stats<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<SeedDataStats, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_syndic_stats<'life0, 'async_trait>(
        &'life0 self,
        organization_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<SyndicDashboardStats, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_owner_stats<'life0, 'async_trait>(
        &'life0 self,
        owner_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<SyndicDashboardStats, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_owner_id_by_user_id<'life0, 'async_trait>(
        &'life0 self,
        user_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Uuid>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_syndic_urgent_tasks<'life0, 'async_trait>(
        &'life0 self,
        organization_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<UrgentTask>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn get_admin_dashboard_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<AdminDashboardStats, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_seed_data_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<SeedDataStats, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_syndic_stats<'life0, 'async_trait>( &'life0 self, organization_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<SyndicDashboardStats, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns stats for all buildings in the given organization.

Source

fn get_owner_stats<'life0, 'async_trait>( &'life0 self, owner_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<SyndicDashboardStats, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns stats for buildings where the given owner has active units.

Source

fn find_owner_id_by_user_id<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Uuid>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Looks up the owner record id associated with a user id.

Source

fn get_syndic_urgent_tasks<'life0, 'async_trait>( &'life0 self, organization_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<UrgentTask>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Returns urgent tasks (overdue expenses, upcoming meetings, old pending charges) for the given organization.

Implementors§