<?php

namespace Modules\Stock\Repository;

use Helpers\QueryBuilder\AbsRepository;

class CsChpsRepository extends AbsRepository
{

    /**
     * @param string $codTab
     * @return array<int,array<string,mixed>>
     */
    public function findAllFromCodeTab(string $codTab): array
    {
        $requete = "SELECT *, CT.FORMAT FROM CS_CHPS CC LEFT JOIN CS_TYPES CT ON CC.TYPE = CT.TYPE";
        $arrayReq = ['codTab' => $codTab];

        return $this->fetchAssocAll($requete, $arrayReq);
    }
}
