fistinc-auth 0.1.0

Paging types for Fist Inc bank
Documentation
use async_trait::async_trait;
use fistinc_errors::ServiceResult;
use fistinc_paging::{Paging, QueryParams};
use uuid::Uuid;

use crate::domain::entity::PasswordChangeAction;

#[async_trait]
pub trait PasswordHistoryService: Send + Sync {
    async fn get_all_user_password_changes(
        &self, user_id: Uuid,
    ) -> ServiceResult<Vec<PasswordChangeAction>>;
    async fn get_all_user_password_changes_paged(
        &self, user_id: Uuid, params: &dyn QueryParams,
    ) -> ServiceResult<Paging<PasswordChangeAction>>;
    async fn save_password_change(
        &self, action: PasswordChangeAction,
    ) -> ServiceResult<PasswordChangeAction>;
}