<?php

require __DIR__.'/vendor/autoload.php';

$app = require_once __DIR__.'/bootstrap/app.php';
$kernel = $app->make('Illuminate\Contracts\Console\Kernel');
$kernel->bootstrap();

use Illuminate\Support\Facades\DB;

echo "=== Payment Tables Status ===" . PHP_EOL . PHP_EOL;

$tables = [
    'transactions' => DB::table('transactions')->count(),
    'invoices' => DB::table('invoices')->count(),
    'subscriptions' => DB::table('subscriptions')->count(),
];

foreach ($tables as $table => $count) {
    $status = $count === 0 ? '✅ Empty' : "⚠️  {$count} records";
    echo str_pad(ucfirst($table), 20) . ": {$status}" . PHP_EOL;
}

echo PHP_EOL;
echo "Database is ready for fresh payment testing! 🚀" . PHP_EOL;
