<?php

namespace App\Controller;

use App\Entity\Organization\Parameters;
use DH\Auditor\Provider\Doctrine\DoctrineProvider;
use DH\Auditor\Provider\Doctrine\Persistence\Reader\Filter\SimpleFilter;
use DH\Auditor\Provider\Doctrine\Persistence\Reader\Reader;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;

class AuditController extends AbstractController
{
    #[Route('/audit_test', name: 'audit_test')]
    public function index(DoctrineProvider $doctrineProvider): Response
    {
        $reader = new Reader($doctrineProvider);
        $query = $reader
            ->createQuery(Parameters::class)
            ->addFilter(new SimpleFilter('object_id', 5755));

        dd($query->execute());
        return new Response('ok');
    }
}
