<?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('service', function (Blueprint $table) {
            $table->id('svc_id');
            $table->foreignId('svph_id')->constrained('service_phase', 'svph_id')->cascadeOnDelete();
            $table->string('svc_numero');            // "01".."09" ou "✦"
            $table->string('svc_icone')->nullable(); // clé d'icône SVG (structurel)
            $table->string('svc_title_fr');
            $table->string('svc_title_en');
            $table->text('svc_desc_fr');
            $table->text('svc_desc_en');
            $table->boolean('svc_exclusif')->default(false); // "Vis ma vie d'expat"
            $table->unsignedInteger('svc_ordre')->default(0);
            $table->timestamp('svc_created_at')->nullable();
            $table->timestamp('svc_updated_at')->nullable();
        });
    }

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