<?php
namespace App\Repositories;

class UserRepository extends BaseRepository
{
    protected string $table = 'users';

    public function findByPhone(string $phone): ?array
    {
        $rows = $this->db->select(
            "SELECT * FROM `{$this->table}` WHERE `phone` = :phone",
            ['phone' => $phone]
        );
        return $rows[0] ?? null;
    }
}
