<?php

namespace Entity\Model;

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

class DomaineFonctionnel extends QueryBuilder
{
    protected \PDO $pdo;

    protected string $table = 'DOMFONCT with (nolock)';

    protected string $primaryKey = 'CODE';
    protected string $libelle = 'LIBELLE';
    public string $titre;

    public function __construct(\PDO $pdo)
    {
        
        $this->pdo = $pdo;
    }

    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        return [
            'CODE' => [
                'nomChamp' => $trad->t('Code'),
                'type' => 'TEXT',
                'taille' => 30,
                'obligatoire' => true,
            ],
            'LIBELLE' => [
                'nomChamp' => $trad->t('Libellé'),
                'type' => 'TEXT',
                'taille' => 60,
                'obligatoire' => true,
            ],
        ];
    }
}
