<?php

namespace Entity\Model;

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

class EvenementDa extends QueryBuilder
{
    protected \PDO $pdo;
    
    protected string $table = 'DA_EVENT with (nolock)';
    
    protected string $primaryKey = 'NO_DA';
    protected string $libelle = '';
    public string $titre;
    public function __construct(\PDO $pdo)
    {
        
        $this->pdo = $pdo;
    }


    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        return  [
            'NO_DA' =>
            [
                'nomChamp' => $trad->t('Num Da'),
                'type' => 'TEXTE',
                'taille' => 7,
                'obligatoire' => true
            ],
            'NUM_ORD' =>
            [
                'nomChamp' => $trad->t('Numero ordre'),
                'type' => 'TEXTE',
                'taille' => 7,
                'obligatoire' => true

            ],
            'DTE' =>
            [
                'nomChamp' => $trad->t('Date'),
                'type' => 'DATE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'HEURE' =>
            [
                'nomChamp' => $trad->t('Heure'),
                'type' => 'HEURE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'CODE' =>
            [
                'nomChamp' => $trad->t('Code'),
                'type' => 'TEXTARE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'UTIL' =>
            [
                'nomChamp' => $trad->t('Utile'),
                'type' => 'TEXTARE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'SIGNAT' =>
            [
                'nomChamp' => $trad->t('Signature'),
                'type' => 'TEXTARE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'HAPLUS' =>
            [
                'nomChamp' => $trad->t('Acheteur'),
                'type' => 'TEXTARE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],
            'NM_COMME' =>
            [
                'nomChamp' => $trad->t('Numero Commentaire'),
                'type' => 'TEXTARE',
                'taille' => 60,
                'genre' => 'float',
                'obligatoire' => true

            ],

        ];
    }
}
