<?php

namespace Modules\Stock\Service\Export;

class BonEntreeExportService extends AbstractExportService
{
    /**
     * @return array<string,array<string,string>>
     */
    public function getArchitecture(): array
    {
        $fields = [
            'SE.NO_BE' => ['nomChamp' => $this->trad->t('N° BE'), 'type' => 'TEXT'],
            'SE.DTE_CREAT' => ['nomChamp' => $this->trad->t('Date de création'), 'type' => 'DATE'],
            'SE.DTE_VALID' => ['nomChamp' => $this->trad->t('Date de validation'), 'type' => 'DATE'],
            'SE.ORIGINE' => ['nomChamp' => $this->trad->t('Origine'), 'type' => 'TEXT'],
            'SE.PROV' => ['nomChamp' => $this->trad->t('Provenance'), 'type' => 'TEXT'],
            'SE.MAG' => ['nomChamp' => $this->trad->t('Magasinier'), 'type' => 'TEXT'],
            'SE.SITE' => ['nomChamp' => $this->trad->t('Site'), 'type' => 'TEXT'],
            'SE.TYPE_BE' => ['nomChamp' => $this->trad->t('Type'), 'type' => 'TEXT'],
            'SE.BE_NOPR' => ['nomChamp' => $this->trad->t('N° Réapprovisionnement'), 'type' => 'TEXT'],
            'SE.CODE_STE' => ['nomChamp' => $this->trad->t('Code société'), 'type' => 'TEXT'],
            'SE.DEVISE' => ['nomChamp' => $this->trad->t('Devise'), 'type' => 'TEXT'],
            'SE.VAL_DEVIS' => ['nomChamp' => $this->trad->t('Valeur devise'), 'type' => 'TEXT'],
            'SL.NO_LIG_BE' => ['nomChamp' => $this->trad->t('N° de ligne'), 'type' => 'TEXT'],
            'SL.QTE_ENT' => ['nomChamp' => $this->trad->t('Quantités entrées'), 'type' => 'TEXT'],
            'SL.CODE_COMP' => ['nomChamp' => $this->trad->t('Code complémentaire'), 'type' => 'TEXT'],
            'SL.SSCPTEANA' => ['nomChamp' => $this->trad->t('Sous compte d\'analyse'), 'type' => 'TEXT'],
            'SL.CODGES' => ['nomChamp' => $this->trad->t('Code gestion'), 'type' => 'TEXT'],
            'SL.LIBGES' => ['nomChamp' => $this->trad->t('Libellé du code gestion'), 'type' => 'TEXT'],
            'SL.ID_CG' => ['nomChamp' => $this->trad->t('ID du code gestion'), 'type' => 'TEXT'],
            'SL.CODE_ART' => ['nomChamp' => $this->trad->t('Code article'), 'type' => 'TEXT'],
            'SA.DESIGN' => ['nomChamp' => $this->trad->t('Désignation article'), 'type' => 'TEXT'],
        ];

        if ($this->isPrixVisible()) {
            $fields['SE.TOT_BE']    = ['nomChamp' => $this->trad->t('Total'), 'type' => 'TEXT'];
            $fields['SL.PRIX_ENT']  = ['nomChamp' => $this->trad->t('Prix entré'), 'type' => 'TEXT'];
        }

        return $fields;
    }
}
