<?php

namespace MintyPHP\Repository\Auth;

interface PasswordResetRepositoryInterface
{
    public function create(int $userId, string $codeHash, string $expiresAt): ?int;

    public function invalidateForUser(int $userId): bool;

    public function findActiveByUserId(int $userId): ?array;

    public function findById(int $id): ?array;

    public function incrementAttempts(int $id): bool;

    public function markUsed(int $id): bool;

    public function listByUserId(int $userId, int $limit = 20): array;
}
