<?php

namespace Entity\Model;

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

class Doa extends QueryBuilder
{
    protected string $table = 'DOA with (nolock)';
    protected string $primaryKey = 'ID';
    protected string $libelle = 'LIB';
    
    
    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        $array = [
            'ID'           => ['nomChamp' => $trad->t('ID'), 'type' => 'TEXT'],
            'REF'          => ['nomChamp' =>$trad->t("Référence"), 'type' => 'TEXT'],
            'LIB'          => ['nomChamp' =>$trad->t("Libellé"), 'type' => 'TEXT'],
            'DESCR'        => ['nomChamp' => $trad->t('Description'), 'type' => 'TEXT'],
            'CODE_OPE'     => ['nomChamp' =>$trad->t("Code opération"), 'type' => 'TEXT'],
            'PROPRIETAIRE' => ['nomChamp' => $trad->t('Proprietaire'), 'type' => 'TEXT'],
            'STATUT'       => ['nomChamp' => $trad->t('Statut'), 'type' => 'TEXT'],
            'PRESCRIPTEUR' => ['nomChamp' => $trad->t('Prescripteur'), 'type' => 'TEXT'],
            'CTR_EMETT'    => ['nomChamp' =>$trad->t("Centre émetteur"), 'type' => 'TEXT'],
            'DATE_CREAT'   => ['nomChamp' =>$trad->t("Date création"), 'type' => 'DATE'],
            'DATE_DEB'     => ['nomChamp' =>$trad->t("Date début"), 'type' => 'DATE'],
            'DATE_FIN'     => ['nomChamp' => $trad->t('Date fin'), 'type' => 'DATE'],
            'MODEPLANNING' => ['nomChamp' =>$trad->t("Mode planning ?"), 'type' => 'RADIO'],
            'ID_PERE'      => ['nomChamp' =>$trad->t("Id projet père"), 'type' => 'TEXT'],
            'IS_PERE'      => ['nomChamp' =>$trad->t("Est projet père ?"), 'type' => 'RADIO'],
            'SUSPENDU'     => ['nomChamp' =>$trad->t("Suspendu ?"), 'type' => 'RADIO'],
        ];
        
        return $array;
    }
}
