<?php

namespace Entity\Model;

use Helpers\Outil\Sql;
use Helpers\QueryBuilder\QueryBuilder;
use PDO;

class ParTxco extends QueryBuilder
{
    protected string $table = 'PAR_TXCO with (nolock)';
    protected string $primaryKey = 'CLE';

    public function __construct(PDO $pdo)
    {
        parent::__construct($pdo);
        $this->primKey = ['CLE'];
    }

    /**
     * @param array<string,mixed> $parametreDivers
     * @return void
     */
    public function processAndMerge(array $parametreDivers): void
    {
        $parametreDivers['BE_CONSO'] = Sql::toBool($parametreDivers['BE_CONSO']);
        $this->merge($parametreDivers);
    }
}
