use uuid::Uuid;
use crate::entities::{ApiKey, ApiKeyUpdate, NewApiKey};
use crate::store::StoreFuture;
pub trait ApiKeyStore: Send + Sync {
fn create_api_key(&self, req: NewApiKey) -> StoreFuture<'_, ApiKey>;
fn find_api_key_by_prefix(&self, prefix: &str) -> StoreFuture<'_, Option<ApiKey>>;
fn find_api_key_by_id(&self, id: Uuid) -> StoreFuture<'_, Option<ApiKey>>;
fn list_api_keys_by_user(&self, user_id: Uuid) -> StoreFuture<'_, Vec<ApiKey>>;
fn update_api_key(&self, id: Uuid, update: ApiKeyUpdate) -> StoreFuture<'_, ()>;
fn touch_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>;
fn delete_api_key(&self, id: Uuid) -> StoreFuture<'_, ()>;
}