<?php

namespace Entity\Model;

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

class Incident extends QueryBuilder
{
    protected \PDO $pdo;
    
    protected string $table = 'INCIDENT with (nolock)';
    
    protected string $primaryKey = 'COD_INC';
    public string $titre;
    public function __construct(\PDO $pdo)
    {
        
        $this->pdo = $pdo;
    }
    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        return  [
            'COD_INC' =>
            [
                'nomChamp' => $trad->t('Code Incident'),
                'type' => 'ZOOM',
                'taille' => 7,
                'obligatoire' => true
            ],
            'LIBELLE' =>
            [
                'nomChamp' => $trad->t('Libelle'),
                'type' => 'TEXTE',
                'taille' => 20,
                'obligatoire' => true

            ],
            'NIVEAU' =>
            [
                'nomChamp' => $trad->t('Niveau'),
                'type' => 'TEXTE',
                'taille' => 40,
                'obligatoire' => true

            ],
            'CODE_CAT' =>
            [
                'nomChamp' => $trad->t('Code Categorie'),
                'type' => 'ZOOM',
                'taille' => 40,
                'obligatoire' => true
                
            ],
            'GERE_HAP' =>
            [
                'nomChamp' =>$trad->t("Gére Hap"),
                'type' => 'RADIO',
                'taille' => 4,
                'obligatoire' => true
                
            ],

        ];
    }
}
