<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        // Singleton (une seule ligne) — section « À propos ».
        Schema::create('about', function (Blueprint $table) {
            $table->id('abt_id');
            $table->string('abt_eyebrow_fr');
            $table->string('abt_eyebrow_en');
            $table->string('abt_title_fr');
            $table->string('abt_title_en');
            $table->text('abt_bio1_fr');
            $table->text('abt_bio1_en');
            $table->text('abt_bio2_fr');
            $table->text('abt_bio2_en');
            $table->text('abt_bio3_fr');
            $table->text('abt_bio3_en');
            $table->text('abt_bio4_fr')->nullable();
            $table->text('abt_bio4_en')->nullable();
            $table->string('abt_linkedin_url')->nullable();
            $table->string('abt_portrait')->nullable(); // chemin image
            $table->timestamp('abt_created_at')->nullable();
            $table->timestamp('abt_updated_at')->nullable();
        });

        // Points « Notre force collective » (liste liée à l'about).
        Schema::create('about_force', function (Blueprint $table) {
            $table->id('abtf_id');
            $table->string('abtf_texte_fr');
            $table->string('abtf_texte_en');
            $table->unsignedInteger('abtf_ordre')->default(0);
            $table->timestamp('abtf_created_at')->nullable();
            $table->timestamp('abtf_updated_at')->nullable();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('about_force');
        Schema::dropIfExists('about');
    }
};
