<?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
    {
        Schema::create('page_legale', function (Blueprint $table) {
            $table->id('pgl_id');
            $table->string('pgl_slug')->unique(); // cgu, confidentialite… (identifie la modale à ouvrir)
            $table->string('pgl_titre_fr');
            $table->string('pgl_titre_en');
            $table->longText('pgl_contenu_fr'); // saisi via l'éditeur riche
            $table->longText('pgl_contenu_en');
            $table->timestamp('pgl_created_at')->nullable();
            $table->timestamp('pgl_updated_at')->nullable();
        });
    }

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