adding features

This commit is contained in:
DioCrafts
2025-04-12 18:58:21 +02:00
parent 090ab07423
commit f2ecbc1a39
7 changed files with 394 additions and 61 deletions
+6
View File
@@ -26,6 +26,12 @@ pub trait UserStoragePort: Send + Sync + 'static {
/// Lista usuarios con paginación
async fn list_users(&self, limit: i64, offset: i64) -> Result<Vec<User>, DomainError>;
/// Lista usuarios por rol (por ejemplo, "admin" o "user")
async fn list_users_by_role(&self, role: &str) -> Result<Vec<User>, DomainError>;
/// Elimina un usuario por su ID
async fn delete_user(&self, user_id: &str) -> Result<(), DomainError>;
/// Cambia la contraseña de un usuario
async fn change_password(&self, user_id: &str, password_hash: &str) -> Result<(), DomainError>;
}