<?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('consultations', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('email');
            $table->string('phone')->nullable();
            $table->string('country', 40)->nullable();
            $table->string('segment');           // individual | corporate | diaspora
            $table->string('topic');             // debt | investing | corporate-training | diaspora-plan | coaching | other
            $table->string('contact_method');    // whatsapp | call | email
            $table->string('preferred_time');    // morning | afternoon | evening
            $table->text('message')->nullable();
            $table->string('status')->default('new'); // new | scheduled | done | closed
            $table->timestamps();
        });
    }

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