<?php

namespace Entity\Model;

use Helpers\Outil\ArrayHelper;
use Helpers\QueryBuilder\QueryBuilder;

class ImpPanR extends QueryBuilder
{
    protected string $table = 'IMP_PAN_R with (nolock)';
    protected string $primaryKey = 'CODE_CHAMP';
    protected string $libelle = 'NOM_CHAMP';

    /**
     * @return array<mixed>
     */
    public function generateArray()
    {
        $result = $this->fetchAll();

        $array = [];
        foreach ($result as $v) {
            $array[$v[$this->primaryKey]] = $v;
        }

        return $array;
    }
}
