<?php
declare(strict_types=1);

require_once __DIR__ . '/../../config/database.php';
require_once __DIR__ . '/../../core/Response.php';

$db = Database::getInstance();

$stmt = $db->query("
    SELECT id, dealer_type
    FROM dealer_types
    WHERE status = 'Active'
    ORDER BY priority ASC
");

Response::success('Dealer types fetched', $stmt->fetchAll());
