<?php

namespace Entity\Model;

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

class FacLigTravail extends QueryBuilder
{
    protected string $table = 'FAC_LIG_TRAVAIL with (nolock)';
    protected string $primaryKey = 'NUM_FACT';
    
    public function getArchitecture(\Helpers\Trad\ITrad $trad)
    {
        $array = [
            'NUM_FACT'              => ['nomChamp' => $trad->t('Facture'), 'type' => 'int'],
            'NUM_LIG'               => ['nomChamp' => $trad->t('Ligne'), 'type' => 'int'],
            'NUM_CDE'               => ['nomChamp' =>$trad->t('N° Cde'), 'type' => 'int'],
            'NUM_LICDE'             => ['nomChamp' =>$trad->t('N° ligne cde'), 'int' => 'int'],
            'NUM_BR'                => ['nomChamp' =>$trad->t('N° BR'), 'type' => 'int'],
            'NUM_LIBR'              => ['nomChamp' =>$trad->t('N° ligne de BR'), 'type' => 'int'],
            'NUM_TERME'             => ['nomChamp' => 'NUM_TERME', 'type' => 'int'],
            'DESIGNAT'              => ['nomChamp' =>$trad->t("Désignation"), 'type' => 'TEXT'],
            'CODE_SFAM'             => ['nomChamp' => $trad->t('Sous-famille'), 'type' => 'TEXT'],
            'TP_QUANT'              => ['nomChamp' => 'TP_QUANT', 'type' => 'RADIO'],
            'QUANTITE'              => ['nomChamp' =>$trad->t("Quantité"), 'type' => 'float'],
            'PU_REMISE'             => ['nomChamp' =>$trad->t("Pu remisé"), 'type' => 'float'],
            'MONTANT'               => ['nomChamp' => $trad->t('Montant'), 'type' => 'float'],
            'CODE_SI'               => ['nomChamp' =>$trad->t("Sect Imp."), 'type' => 'TEXT'],
            'CODE_CDC'              => ['nomChamp' =>$trad->t("CodeComp."), 'type' => 'TEXT'],
            'CODE_SCA'              => ['nomChamp' => $trad->t('ScptAna'), 'type' => 'TEXT'],
            'CODE_PROFIL_TVA'       => ['nomChamp' => $trad->t('Code profil TVA'), 'type' => 'TEXT'],
            'TYPE_TVA'              => ['nomChamp' => $trad->t('Type TVA'), 'type' => 'TEXT'],
            'TAUX_TVA'              => ['nomChamp' => $trad->t('Taux TVA'), 'type' => 'float'],
            'REF_FACT'              => ['nomChamp' =>$trad->t("Ref. facture"), 'type' => 'int'],
            'CODE_STE'              => ['nomChamp' =>$trad->t("Société"), 'type' => 'TEXT'],
            'NUM_EXP'               => ['nomChamp' => 'NUM_EXP', 'type' => 'int'],
            'NOLIGEXP'              => ['nomChamp' => 'NOLIGEXP', 'type' => 'int'],
            'DATEMODI'              => ['nomChamp' => $trad->t('Date modif'), 'type' => 'DATE'],
            'AFF_TMP'               => ['nomChamp' => 'AFF_TMP', 'type' => 'RADIO'],
            'LIG_ERR'               => ['nomChamp' => 'LIG_ERR', 'type' => 'RADIO'],
            'REFARTFOU'             => ['nomChamp' =>$trad->t("Réf. article fournisseur"), 'type' => 'TEXT'],
            'ID_CG'                 => ['nomChamp' => 'ID_CG', 'type' => 'TEXT'],
            'MT_TVA'                => ['nomChamp' => $trad->t('Montant TVA'), 'type' => 'float'],
            'SELECTIONNEE'          => ['nomChamp' => 'SELECTIONNEE', 'type' => 'RADIO'],
            'DESCOMP'               => ['nomChamp' =>$trad->t("Désignation compl."), 'type' => 'TEXT'],
        ];
        
        return $array;
    }
}
