use uuid::Uuid;
use crate::entities::{NewUser, Page, User};
use crate::store::StoreFuture;
pub trait UserStore: Send + Sync {
fn create_user(&self, req: NewUser) -> StoreFuture<'_, User>;
fn find_user_by_email(&self, email: &str) -> StoreFuture<'_, Option<User>>;
fn find_user_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<User>>;
fn count_users(&self) -> StoreFuture<'_, u64>;
fn list_users(&self, page: u32, per_page: u32) -> StoreFuture<'_, Page<User>>;
fn delete_user(&self, id: Uuid) -> StoreFuture<'_, ()>;
fn update_user_role(&self, id: Uuid, is_admin: bool) -> StoreFuture<'_, User>;
}