@echo off
echo ========================================
echo   Verificacion de Base de Datos
echo ========================================
echo.

echo Verificando conexion a PostgreSQL...
psql -U postgres -d cler_admin -c "SELECT 'Conexion exitosa!' as status;"

echo.
echo Verificando tablas...
psql -U postgres -d cler_admin -c "\dt"

echo.
echo Verificando usuarios admin...
psql -U postgres -d cler_admin -c "SELECT username, email, full_name FROM admin_users;"

echo.
echo Verificando roles...
psql -U postgres -d cler_admin -c "SELECT name, display_name FROM roles;"

echo.
echo Verificando permisos del super admin...
psql -U postgres -d cler_admin -c "SELECT COUNT(*) as total_permisos FROM role_permissions WHERE role_id = 1;"

echo.
echo ========================================
echo   Verificacion completada
echo ========================================
pause
