<?php
namespace App\Repositories;

class ColorRepository extends BaseRepository
{
    protected string $table = 'colors';

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