TicketRepository

Trait TicketRepository 

Source
pub trait TicketRepository: Send + Sync {
    // Required methods
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ticket: &'life1 Ticket,
    ) -> Pin<Box<dyn Future<Output = Result<Ticket, 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<Ticket>, 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<Ticket>, 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<Ticket>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_by_created_by<'life0, 'async_trait>(
        &'life0 self,
        created_by: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticket>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_by_assigned_to<'life0, 'async_trait>(
        &'life0 self,
        assigned_to: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticket>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn find_by_status<'life0, 'async_trait>(
        &'life0 self,
        building_id: Uuid,
        status: TicketStatus,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticket>, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ticket: &'life1 Ticket,
    ) -> Pin<Box<dyn Future<Output = Result<Ticket, 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,
        building_id: Uuid,
        status: TicketStatus,
    ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

fn find_by_status<'life0, 'async_trait>( &'life0 self, building_id: Uuid, status: TicketStatus, ) -> Pin<Box<dyn Future<Output = Result<Vec<Ticket>, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

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,

Source

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,

Source

fn count_by_status<'life0, 'async_trait>( &'life0 self, building_id: Uuid, status: TicketStatus, ) -> Pin<Box<dyn Future<Output = Result<i64, String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§