<?php

namespace App\Exports;

use App\Models\Reforme;
use Illuminate\Support\Facades\Log;

class ReformeExport extends BaseExport
{
    protected function getExportColumns(): array
    {
        return [
            ['name' => 'id', 'label' => 'ID', 'type' => 'numeric'],
            ['name' => 'libelle', 'label' => 'Libellé', 'type' => 'text'],
            ['name' => 'description', 'label' => 'Description', 'type' => 'text'],
            ['name' => 'date_debut', 'label' => 'Date de début', 'type' => 'date'],
            ['name' => 'date_fin', 'label' => 'Date de fin', 'type' => 'date'],
            ['name' => 'created_at', 'label' => 'Date de création', 'type' => 'datetime'],
            ['name' => 'updated_at', 'label' => 'Date de mise à jour', 'type' => 'datetime'],
        ];
    }

    protected function getExportTitle(): string
    {
        return 'Réformes';
    }

    protected function getModelClass()
    {
        return Reforme::class;
    }
}
