pub trait NoticeRepository: Send + Sync {
Show 15 methods
// Required methods
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, 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<Notice>, 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<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_published_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_pinned_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_type<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
notice_type: NoticeType,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_category<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
category: NoticeCategory,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: NoticeStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_by_author<'life0, 'async_trait>(
&'life0 self,
author_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn find_expired<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, 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<(), 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_published_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_pinned_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
Repository port for Notice aggregate
Required Methods§
Sourcefn create<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new notice
Sourcefn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<Notice>, 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<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notice by ID
Sourcefn find_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, 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<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all notices for a building
Sourcefn find_published_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_published_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all published notices for a building (visible to members)
Sourcefn find_pinned_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_pinned_by_building<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all pinned notices for a building (important announcements)
Sourcefn find_by_type<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
notice_type: NoticeType,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_type<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
notice_type: NoticeType,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by type (Announcement, Event, LostAndFound, ClassifiedAd)
Sourcefn find_by_category<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
category: NoticeCategory,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_category<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
category: NoticeCategory,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by category (General, Maintenance, Social, Security, etc.)
Sourcefn find_by_status<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: NoticeStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
status: NoticeStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find notices by status (Draft, Published, Archived, Expired)
Find all notices created by an author (Owner)
Sourcefn find_expired<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_expired<'life0, 'async_trait>(
&'life0 self,
building_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<Notice>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all expired notices for a building (for auto-archiving)
Sourcefn update<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
notice: &'life1 Notice,
) -> Pin<Box<dyn Future<Output = Result<Notice, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update an existing notice
Sourcefn delete<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), 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<(), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete a notice
Sourcefn 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_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,
Count total notices for a building