<?php
declare(strict_types=1);

namespace App\Models;

use App\Core\Model;
use PDO;

class TaxRateModel extends Model
{
    protected string $table = 'tax_rates';

    public function getAll(int $tenantId): array
    {
        $stmt = $this->db->prepare("SELECT * FROM tax_rates WHERE tenant_id = ? ORDER BY rate DESC");
        $stmt->execute([$tenantId]);
        return $stmt->fetchAll(PDO::FETCH_ASSOC);
    }
}
