pub trait ConvocationRepository: Send + Sync {
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, 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<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_meeting_id<'life0, 'async_trait>(
&'life0 self,
meeting_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Convocation>, 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<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ConvocationStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_pending_scheduled<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_needing_reminder<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, 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_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;
fn count_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ConvocationStatus,
) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
Sourcefn create<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new convocation
Sourcefn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Convocation>, 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<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find convocation by ID
Sourcefn find_by_meeting_id<'life0, 'async_trait>(
&'life0 self,
meeting_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_meeting_id<'life0, 'async_trait>(
&'life0 self,
meeting_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find convocation by meeting ID
Sourcefn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, 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<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all convocations for a building
Sourcefn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all convocations for an organization
Sourcefn find_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ConvocationStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ConvocationStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find convocations by status
Sourcefn find_pending_scheduled<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_pending_scheduled<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find convocations scheduled to be sent (status = Scheduled and scheduled_send_date <= now)
Sourcefn find_needing_reminder<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_needing_reminder<'life0, 'async_trait>(
&'life0 self,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Convocation>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find sent convocations that need reminder (sent but 3 days before meeting, reminder not sent yet)
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
convocation: &'life1 Convocation,
) -> Pin<Box<dyn Future<Output = Result<Convocation, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update convocation
Sourcefn 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 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,
Delete convocation