<?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('partner_registration_requests', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->string('phone');
            $table->string('email')->nullable();
            $table->enum('partner_type', ['driver', 'restaurant', 'gas_office']);
            $table->string('business_name')->nullable();
            $table->string('city')->nullable();
            $table->text('notes')->nullable();
            $table->enum('status', ['pending', 'contacted', 'approved', 'rejected'])->default('pending');
            $table->timestamps();

            $table->index(['partner_type', 'status']);
        });
    }

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