use super::{NaiveDate, Result, UserId, async_trait}; /// Repository for weekly review tracking. #[async_trait] pub trait WeeklyReviewRepository: Send + Sync { /// Gets the weekly review for a specific week. async fn get_for_week( &self, user_id: UserId, week_start: NaiveDate, ) -> Result>; /// Creates or updates a weekly review. async fn upsert( &self, user_id: UserId, week_start: NaiveDate, notes: &str, ) -> Result; /// Lists every weekly review for a user across all weeks (for full backup export). async fn list_all(&self, user_id: UserId) -> Result>; /// Checks if the current week's review is completed. async fn is_current_week_completed(&self, user_id: UserId) -> Result; /// Sets vacation days for a specific week. async fn set_vacation_days( &self, user_id: UserId, week_start: NaiveDate, days: &[u8], ) -> Result<()>; } /// Repository for daily review notes. #[async_trait] pub trait DailyNoteRepository: Send + Sync { /// Gets the daily note for a specific date. async fn get_by_date( &self, user_id: UserId, date: NaiveDate, ) -> Result>; /// Creates or updates a daily note (upsert by user_id + date). async fn upsert( &self, user_id: UserId, date: NaiveDate, went_well: &str, could_improve: &str, is_reviewed: bool, ) -> Result; /// Lists every daily note for a user (for full backup export). async fn list_all(&self, user_id: UserId) -> Result>; } /// Repository for monthly review goals and reflections. #[async_trait] pub trait MonthlyReviewRepository: Send + Sync { /// Gets all goals for a specific month. async fn list_goals( &self, user_id: UserId, month: &str, ) -> Result>; /// Lists every goal for a user across all months (for full backup export). async fn list_all_goals(&self, user_id: UserId) -> Result>; /// Lists every reflection for a user across all months (for full backup export). async fn list_all_reflections( &self, user_id: UserId, ) -> Result>; /// Creates or updates a goal for a month at a given position (1-3). async fn upsert_goal( &self, user_id: UserId, month: &str, text: &str, position: i32, ) -> Result; /// Updates the status of a goal. async fn update_goal_status( &self, id: crate::MonthlyGoalId, user_id: UserId, status: &crate::models::MonthlyGoalStatus, ) -> Result>; /// Deletes a goal. async fn delete_goal(&self, id: crate::MonthlyGoalId, user_id: UserId) -> Result; /// Gets the reflection for a specific month. async fn get_reflection( &self, user_id: UserId, month: &str, ) -> Result>; /// Creates or updates the reflection for a month. async fn upsert_reflection( &self, user_id: UserId, month: &str, highlight: &str, change: &str, ) -> Result; }