<?php
require_once __DIR__ . '/../src/Utils/Env.php';
require_once __DIR__ . '/../src/Config/Database.php';

use App\Utils\Env;
use App\Config\Database;

Env::load(__DIR__ . '/../../.env');
$db = Database::getInstance()->getConnection();

echo "<h3>Conversations</h3>";
$stmt = $db->query("SELECT * FROM conversations ORDER BY id DESC LIMIT 5");
echo "<pre>" . print_r($stmt->fetchAll(PDO::FETCH_ASSOC), true) . "</pre>";

echo "<h3>Messages</h3>";
$stmt = $db->query("SELECT * FROM messages ORDER BY id DESC LIMIT 5");
echo "<pre>" . print_r($stmt->fetchAll(PDO::FETCH_ASSOC), true) . "</pre>";

echo "<h3>Users</h3>";
$stmt = $db->query("SELECT id, username, is_seed, real_user_id FROM users ORDER BY id DESC LIMIT 5");
echo "<pre>" . print_r($stmt->fetchAll(PDO::FETCH_ASSOC), true) . "</pre>";
