<?php

namespace Entity\Model;

use Helpers\QueryBuilder\QueryBuilder;

class AcdEvent extends QueryBuilder
{
    protected string $table = 'ACD_EVT with (nolock)';
    protected string $primaryKey = 'CODE_ACD';
    protected string $libelle = 'COMMENTAIRE';

    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        $array = [
            'CODE_ACD' => ['nomChamp' => $trad->t('Code Accord-cadre'), 'type' => 'TEXT'],
            'LIBELLE'   => ['nomChamp' => $trad->t('Libellé'), 'type' => 'TEXT'],
            'CODE_FOUR'   => ['nomChamp' => $trad->t('Fournisseur / Groupement'), 'type' => 'TEXT'],
            'DATE_DEB'   => ['nomChamp' => $trad->t('Date de début'), 'type' => 'DATE'],
            'DATE_FIN'   => ['nomChamp' => $trad->t('Date de fin'), 'type' => 'DATE'],
            'BUDGET'   => ['nomChamp' => $trad->t('Montant prévisionnel'), 'type' => 'TEXT'],
            'MARCHE'   => ['nomChamp' => $trad->t('Marché'), 'type' => 'TEXT'],
            'TYPE_FG'   => ['nomChamp' => $trad->t('Type'), 'type' => 'TEXT'],
            'DEL_PRE'   => ['nomChamp' => $trad->t('Préavis'), 'type' => 'TEXT'],
            'JOU_MOI'   => ['nomChamp' => $trad->t('Type de préavis'), 'type' => 'TEXT'],
            'DEL_ALE'   => ['nomChamp' => $trad->t('Délai d\'alerte'), 'type' => 'TEXT'],
            'DEJ_ALE'   => ['nomChamp' => $trad->t('Déjà alerté ?'), 'type' => 'RADIO'],
            'AUTOCC'   => ['nomChamp' => $trad->t('Autorisé à Cde eProc ?'), 'type' => 'RADIO'],
            'ACH_RESP'   => ['nomChamp' => $trad->t('Responsable Achats'), 'type' => 'TEXT'],
            'CDEAUTO'   => ['nomChamp' => $trad->t('Commande automatique ?'), 'type' => 'RADIO'],
            'AVENANT'   => ['nomChamp' => $trad->t('Avenant'), 'type' => 'TEXT'],
            'MOT_AVNT'   => ['nomChamp' => $trad->t('Motif d\'avenant'), 'type' => 'TEXT'],
            'ACD_COMMENT'   => ['nomChamp' => $trad->t('Commentaire'), 'type' => 'TEXT'],
        ];

        return $array;
    }
}
