<?php

namespace Entity\Model;

use Helpers\QueryBuilder\QueryBuilder;
use Modules\Stock\Helper\StringHelper;

class SbeLign extends QueryBuilder
{
    protected string $table = 'SBE_LIGN with (nolock)';
    protected array $primKey = ['NO_BE', 'NO_LIG_BE'];

    /**
     * @param array<string,mixed> $ligneBonEntree
     * @return void
     */
    public function processAndMerge(array $ligneBonEntree): void
    {
        StringHelper::toFloat($ligneBonEntree, ['QTE_ENT', 'PRIX_ENT']);
        $this->merge($ligneBonEntree);
    }
}
