<?php
namespace App\Repositories;

class AddressRepository extends BaseRepository
{
    protected string $table = 'adress';

    public function findByUser(int $userId): array
    {
        return $this->db->select(
            "SELECT * FROM `{$this->table}` WHERE `user_id` = :uid ORDER BY `id` DESC",
            ['uid' => $userId]
        );
    }
}
