fistinc-auth 0.1.0

Paging types for Fist Inc bank
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use async_trait::async_trait;
use fistinc_errors::ServiceResult;
use fistinc_paging::{Paging, QueryParams};
use uuid::Uuid;

use crate::domain::entity::LoginAction;

#[async_trait]
pub trait LoginHistoryService: Send + Sync {
    async fn get_all_user_logins(
        &self, user_id: Uuid,
    ) -> ServiceResult<Vec<LoginAction>>;
    async fn get_all_user_logins_paged(
        &self, user_id: Uuid, params: &dyn QueryParams,
    ) -> ServiceResult<Paging<LoginAction>>;
    async fn save_login(&self, action: LoginAction) -> ServiceResult<LoginAction>;
}