<?php

namespace Entity\Model;

use Helpers\QueryBuilder\QueryBuilder;

class SbsEnte extends QueryBuilder
{
    protected \PDO $pdo;
    
    protected string $table = 'SBS_ENTE with (nolock)';
    
    protected string $primaryKey = 'NO_BS';
    
    public function __construct(\PDO $pdo)
    {
        $this->pdo = $pdo;
    }

    /**
     * @param \Helpers\Trad\ITrad $trad
     * @return array<mixed>
     */
    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        return [
            'NO_BS'     => ['nomChamp' => $trad->t('Numéro de BS')],
            'DTE_CREAT' => ['nomChamp' => $trad->t('Date de création'), 'type' => 'DATE'],
            'DTE_VALID' => ['nomChamp' => $trad->t('Date de validation'), 'type' => 'DATE'],
            'ORIGINE'   => ['nomChamp' => $trad->t('Origine')],
            'DEST'      => ['nomChamp' => $trad->t('Destinataire')],
            'MAG'       => ['nomChamp' => $trad->t('Magasinier')],
            'SITE'      => ['nomChamp' => $trad->t('Site de stock')],
            'TOT_BS'    => ['nomChamp' => $trad->t('Total')],
            'CODE_STE'  => ['nomChamp' => $trad->t('Code société')],
            'DEVISE'    => ['nomChamp' => $trad->t('Devise')],
        ];
    }
}
