use async_trait::async_trait; use uuid::Uuid; use crate::{domain::user::User, error::AppError}; /// Port (interface) para operações de persistência de usuários. /// Implementado pelo adapter `PostgresUserRepository`. #[async_trait] pub trait UserRepository: Send + Sync { async fn find_by_id(&self, id: Uuid) -> Result, AppError>; async fn find_by_email(&self, email: &str) -> Result, AppError>; async fn find_by_google_id(&self, google_id: &str) -> Result, AppError>; async fn create(&self, user: &User) -> Result; async fn update(&self, user: &User) -> Result; async fn verify_email(&self, id: Uuid) -> Result<(), AppError>; }