Files
hackathon-opti-1a67c9077937…/backend/src/domain/repositories/auth.repository.ts
2026-05-22 19:26:38 -06:00

11 lines
545 B
TypeScript

/**
* auth.repository.ts
* AuthRepository (interfaz): define qué métodos debe tener el repositorio de auth.
* El use-case usa esta interfaz sin saber cómo se implementa.
*/
export interface AuthRepository {
findByEmail(email: string): Promise<{ id: number; email: string; password: string; name: string } | null>;
create(data: { name: string; email: string; password: string }): Promise<{ id: number; email: string; name: string }>;
findById(id: number): Promise<{ id: number; email: string; name: string; role: string } | null>;
}