<?php

namespace Entity\Model;

use Helpers\QueryBuilder\QueryBuilder;
use Helpers\Trad\Trad;

class CampAsso extends QueryBuilder
{
    protected \PDO $pdo;
    
    protected string $table = 'CAMP_ASSO with (nolock)';
    protected string $primaryKey = '';
    
    public function __construct(\PDO $pdo)
    {
        $this->pdo = $pdo;
    }
    
    /**
     * getArchitecture
     *
     * @return array<mixed>
     */
    public function getArchitecture(\Helpers\Trad\ITrad $trad) : array
    {
        return  [
            'ID_CAMP' =>
            [
                'nomChamp' => $trad->t('N° Campagne'),
                'type' => 'FLOAT',
                'obligatoire' => true
            ],
            'TYPE_OBJ' =>
            [
                'nomChamp' => $trad->t('Type d\'association'),
                'type' => 'TEXTE',
                'taille' => 15,
            ],
            'VAL_OBJ' =>
            [
                'nomChamp' => $trad->t('Élément associé'),
                'type' => 'TEXTAREA',
                'taille' => 30,
            ],
            'CODE_STE' =>
            [
                'nomChamp' => $trad->t('Code société'),
                'type' => 'TEXTE',
                'taille' => 7,
            ],
        ];
    }
}
