<?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('enquiries', function (Blueprint $table) {
            $table->id();
            $table->string('full_name', 120);
            $table->string('company_name', 160)->nullable();
            $table->string('email', 190);
            $table->string('phone', 40)->nullable();
            $table->string('country', 100)->nullable();
            $table->string('product_interest', 40);
            $table->string('enquiry_type', 40);
            $table->string('estimated_quantity', 120)->nullable();
            $table->text('message');
            $table->boolean('consent')->default(false);
            $table->string('source_page', 500)->nullable();
            $table->string('status', 20)->default('new')->index();
            $table->timestamps();
        });
    }

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