pub struct PostgresPaymentReminderRepository { /* private fields */ }Implementations§
Trait Implementations§
Source§impl PaymentReminderRepository for PostgresPaymentReminderRepository
impl PaymentReminderRepository for PostgresPaymentReminderRepository
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
reminder: &'life1 PaymentReminder,
) -> Pin<Box<dyn Future<Output = Result<PaymentReminder, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
reminder: &'life1 PaymentReminder,
) -> Pin<Box<dyn Future<Output = Result<PaymentReminder, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new payment reminder
Source§fn find_by_id<'life0, 'async_trait>(
&'life0 self,
id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PaymentReminder>, 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<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find a reminder by ID
Source§fn find_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all reminders for a specific expense
Source§fn find_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, 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<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all reminders for a specific owner
Source§fn find_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, 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<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all reminders for an organization
Source§fn find_by_status<'life0, 'async_trait>(
&'life0 self,
status: ReminderStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_status<'life0, 'async_trait>(
&'life0 self,
status: ReminderStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all reminders with a specific status
Source§fn find_by_organization_and_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ReminderStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_by_organization_and_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
status: ReminderStatus,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all reminders with a specific status for an organization
Source§fn find_pending_reminders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_pending_reminders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all pending reminders that should be sent (status = Pending)
Source§fn find_reminders_needing_escalation<'life0, 'async_trait>(
&'life0 self,
cutoff_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_reminders_needing_escalation<'life0, 'async_trait>(
&'life0 self,
cutoff_date: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all sent reminders that need escalation (sent > 15 days ago)
Source§fn find_latest_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_latest_by_expense<'life0, 'async_trait>(
&'life0 self,
expense_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find the latest reminder for a specific expense
Source§fn find_active_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_active_by_owner<'life0, 'async_trait>(
&'life0 self,
owner_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<PaymentReminder>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Find all active (non-paid, non-cancelled) reminders for an owner
Source§fn count_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<(ReminderStatus, i64)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn count_by_status<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Vec<(ReminderStatus, i64)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics: count reminders by status for an organization
Source§fn get_total_owed_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<f64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_owed_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<f64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics: total amount owed by organization
Source§fn get_total_penalties_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<f64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_total_penalties_by_organization<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<f64, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get statistics: total penalties by organization
Source§fn find_overdue_expenses_without_reminders<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
min_days_overdue: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, i64, f64)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn find_overdue_expenses_without_reminders<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
min_days_overdue: i64,
) -> Pin<Box<dyn Future<Output = Result<Vec<(Uuid, Uuid, i64, f64)>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get overdue expenses without reminders (for automated detection)
Returns list of (expense_id, owner_id, days_overdue, amount)
Source§fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
reminder: &'life1 PaymentReminder,
) -> Pin<Box<dyn Future<Output = Result<PaymentReminder, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update<'life0, 'life1, 'async_trait>(
&'life0 self,
reminder: &'life1 PaymentReminder,
) -> Pin<Box<dyn Future<Output = Result<PaymentReminder, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update a reminder
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,
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 a reminder
Source§fn get_dashboard_stats<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(f64, f64, Vec<(ReminderLevel, i64)>), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_dashboard_stats<'life0, 'async_trait>(
&'life0 self,
organization_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(f64, f64, Vec<(ReminderLevel, i64)>), String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get payment recovery dashboard data for an organization
Returns: (total_owed, total_penalties, reminder_count_by_level)
Auto Trait Implementations§
impl Freeze for PostgresPaymentReminderRepository
impl !RefUnwindSafe for PostgresPaymentReminderRepository
impl Send for PostgresPaymentReminderRepository
impl Sync for PostgresPaymentReminderRepository
impl Unpin for PostgresPaymentReminderRepository
impl !UnwindSafe for PostgresPaymentReminderRepository
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Chain<T> for T
impl<T> Chain<T> for T
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.