<?php

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

return new class extends Migration {
    public function up()
    {
        Schema::create('staff_applications', function (Blueprint $table) {
            $table->uuid('id')->primary();
            $table->string('topic')->index();
            $table->string('name');
            $table->string('email');
            $table->string('role')->nullable();
            $table->string('portfolio')->nullable();
            $table->text('message')->nullable();
            $table->json('payload')->nullable();
            $table->string('ip', 45)->nullable();
            $table->text('user_agent')->nullable();
            $table->timestamps();
        });
    }

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