<?php

declare(strict_types=1);

namespace App\Repositories;

use Core\Repository;

class UserRepository extends Repository
{
    protected string $table = 'users';
    protected string $primaryKey = 'id';

    public function findByEmail(string $email): ?array
    {
        return $this->database->first(
            'SELECT * FROM users WHERE email = :email',
            ['email' => $email]
        );
    }
}
