pub struct GamificationStatsUseCases { /* private fields */ }Expand description
Use cases for gamification statistics and leaderboards
Orchestrates complex queries across achievements, challenges, and user data.
Implementations§
Source§impl GamificationStatsUseCases
impl GamificationStatsUseCases
pub fn new( achievement_repo: Arc<dyn AchievementRepository>, user_achievement_repo: Arc<dyn UserAchievementRepository>, challenge_repo: Arc<dyn ChallengeRepository>, progress_repo: Arc<dyn ChallengeProgressRepository>, user_repo: Arc<dyn UserRepository>, ) -> Self
Sourcepub async fn get_user_stats(
&self,
user_id: Uuid,
organization_id: Uuid,
) -> Result<UserGamificationStatsDto, String>
pub async fn get_user_stats( &self, user_id: Uuid, organization_id: Uuid, ) -> Result<UserGamificationStatsDto, String>
Get comprehensive gamification stats for a user
Sourcepub async fn get_leaderboard(
&self,
organization_id: Uuid,
building_id: Option<Uuid>,
limit: i64,
) -> Result<LeaderboardResponseDto, String>
pub async fn get_leaderboard( &self, organization_id: Uuid, building_id: Option<Uuid>, limit: i64, ) -> Result<LeaderboardResponseDto, String>
Get leaderboard for an organization or building
Auto Trait Implementations§
impl Freeze for GamificationStatsUseCases
impl !RefUnwindSafe for GamificationStatsUseCases
impl Send for GamificationStatsUseCases
impl Sync for GamificationStatsUseCases
impl Unpin for GamificationStatsUseCases
impl !UnwindSafe for GamificationStatsUseCases
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.