<?php
require dirname(__DIR__) . '/vendor/autoload.php';
$app = require_once dirname(__DIR__) . '/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

use App\Models\Reservation;

echo "Reservation Counts:\n";
echo "- Total: " . Reservation::count() . "\n";
echo "- Pending: " . Reservation::where('status', 'pending')->count() . "\n";
echo "- Confirmed: " . Reservation::where('status', 'confirmed')->count() . "\n";
echo "- Checked-in: " . Reservation::where('status', 'checked_in')->count() . "\n";
echo "- Checked-out: " . Reservation::where('status', 'checked_out')->count() . "\n";
echo "- Cancelled: " . Reservation::where('status', 'cancelled')->count() . "\n";

if (Reservation::where('status', 'checked_in')->count() > 0) {
    echo "\nSample Checked-in Reservation:\n";
    $r = Reservation::where('status', 'checked_in')->first();
    echo "- ID: {$r->id} | Num: {$r->reservation_number} | Amount: {$r->total_amount} | Paid: {$r->paid_amount}\n";
}
