<?php

namespace Modules\Stock\Service\Export;

class StockArticleExportService extends AbstractExportService
{
    /**
     * @return array<string,array<string,string>>
     */
    public function getArchitecture(): array
    {
        $fields = [
            'SA.CODE_ART' => ['nomChamp' => $this->trad->t('Code article'), 'type' => 'TEXT'],
            'SA.DESIGN' => ['nomChamp' => $this->trad->t('Désignation'), 'type' => 'DATE'],
            'ME.CONTMEMO' => ['nomChamp' => $this->trad->t('Description'), 'type' => 'DATE'],
            'SA.DTE_CREAT' => ['nomChamp' => $this->trad->t('Date création'), 'type' => 'DATE'],
            'SA.DTE_MAJ' => ['nomChamp' => $this->trad->t('Date maj'), 'type' => 'DATE'],
            'SA.DTE_INV' => ['nomChamp' => $this->trad->t('Date inventaire'), 'type' => 'DATE'],
            'SA.DTE_FERM' => ['nomChamp' => $this->trad->t('Date fermée'), 'type' => 'DATE'],
            'SA.DIMENSION' => ['nomChamp' => $this->trad->t('Dimension'), 'type' => 'NUMBER'],
            'SA.QTE_PHY' => ['nomChamp' => $this->trad->t('Quantité physique'), 'type' => 'NUMBER'],
            'SA.QTE_RES' => ['nomChamp' => $this->trad->t('Quantité réservée'), 'type' => 'NUMBER'],
            'SA.QTE_INDIS' => ['nomChamp' => $this->trad->t('Quantité indisponible'), 'type' => 'NUMBER'],
            'SA.QTE_TRF' => ['nomChamp' => $this->trad->t('Quantité transférée'), 'type' => 'NUMBER'],
            'SA.QTE_REAP' => ['nomChamp' => $this->trad->t('Quantité en réapprovisionnement'), 'type' => 'NUMBER'],
            'SA.QTE_LIV' => ['nomChamp' => $this->trad->t('Quantité livrée'), 'type' => 'NUMBER'],
            'SA.TYPE_VALO' => ['nomChamp' => $this->trad->t('Type valorisation'), 'type' => 'TEXT'],
            'SA.TRACABLE' => ['nomChamp' => $this->trad->t('Traçable ?'), 'type' => 'BOOL'],
            'SA.STK_PROT' => ['nomChamp' => $this->trad->t('Stock de protection'), 'type' => 'NUMBER'],
            'SA.QTE_ECO' => ['nomChamp' => $this->trad->t('Quantité économique'), 'type' => 'NUMBER'],
            'SA.CLASSE' => ['nomChamp' => $this->trad->t('Classe'), 'type' => 'TEXT'],
            'SA.UNITE_STK' => ['nomChamp' => $this->trad->t('Unité stockée'), 'type' => 'TEXT'],
            'SA.UNITE_ACH' => ['nomChamp' => $this->trad->t('Unité achetée'), 'type' => 'TEXT'],
            'SA.CONVER' => ['nomChamp' => $this->trad->t('Conversion'), 'type' => 'TEXT'],
            'SA.SSFAM' => ['nomChamp' => $this->trad->t('Sous-famille'), 'type' => 'TEXT'],
            'SA.RUBRIQUE' => ['nomChamp' => $this->trad->t('Rubrique'), 'type' => 'TEXT'],
            'SA.ART_REMP1' => ['nomChamp' => $this->trad->t('Article Remplacement 1'), 'type' => 'TEXT'],
            'SA.CONV_ART1' => ['nomChamp' => $this->trad->t('Conversion Article 1'), 'type' => 'TEXT'],
            'SA.ART_REMP2' => ['nomChamp' => $this->trad->t('Article Remplacement 2'), 'type' => 'TEXT'],
            'SA.CONV_ART2' => ['nomChamp' => $this->trad->t('Conversion Article 2'), 'type' => 'TEXT'],
            'SA.ART_REMP3' => ['nomChamp' => $this->trad->t('Article Remplacement 3'), 'type' => 'TEXT'],
            'SA.CONV_ART3' => ['nomChamp' => $this->trad->t('Conversion Article 3'), 'type' => 'TEXT'],
            'SA.FOU1' => ['nomChamp' => $this->trad->t('Fournisseur 1'), 'type' => 'TEXT'],
            'SA.FOU2' => ['nomChamp' => $this->trad->t('Fournisseur 2'), 'type' => 'TEXT'],
            'SA.FOU3' => ['nomChamp' => $this->trad->t('Fournisseur 3'), 'type' => 'TEXT'],
            'SA.NBARTFILS' => ['nomChamp' => $this->trad->t('Nombre articles fils'), 'type' => 'NUMBER'],
            'SA.ART_ACH' => ['nomChamp' => $this->trad->t('Article acheté ?'), 'type' => 'BOOL'],
            'SA.QTE_DEB' => ['nomChamp' => $this->trad->t('Quantité déb'), 'type' => 'NUMBER'],
            'SA.CUM_QTE_S' => ['nomChamp' => $this->trad->t('Cumul Qte S'), 'type' => 'NUMBER'],
            'SA.ART_LOUE' => ['nomChamp' => $this->trad->t('Article loué ?'), 'type' => 'BOOL'],
            'SA.TX_LOCAT' => ['nomChamp' => $this->trad->t('Taux local'), 'type' => 'NUMBER'],
            'SA.EXISTREEL' => ['nomChamp' => $this->trad->t('Existe réellement ?'), 'type' => 'BOOL'],
            'SA.DT_DERNCA' => ['nomChamp' => $this->trad->t('Date dernier CA'), 'type' => 'DATE'],
            'SA.STRATEG' => ['nomChamp' => $this->trad->t('Stratégique ?'), 'type' => 'BOOL'],
            'SA.DATEMODI' => ['nomChamp' => $this->trad->t('Date modification'), 'type' => 'DATE'],
            'SA.QTE_ACHEM' => ['nomChamp' => $this->trad->t('Quantité acheminée'), 'type' => 'NUMBER'],
        ];

        if ($this->isPrixVisible()) {
            $fields['SA.CUM_MT_S'] = ['nomChamp' => $this->trad->t('Cumul MT S'), 'type' => 'NUMBER'];
            $fields['SA.VALEUR'] = ['nomChamp' => $this->trad->t('Valeur'), 'type' => 'NUMBER'];
        }

        return $fields;
    }
}
