<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('auto_quotes', function (Blueprint $table) {
            $table->id();
	              $table->string('type');
  $table->string('first_name');
            $table->string('last_name');
            $table->string('zip_code');
            $table->string('email_address');
            $table->string('phone_number');

            // Vehicles - storing multiple vehicles as JSON
            $table->json('vehicles')->nullable();

            // Drivers - storing multiple drivers as JSON
            $table->json('drivers')->nullable();

            // History and Savings
            $table->boolean('currently_issued')->nullable();
            $table->boolean('sr_22_needed')->nullable();
            $table->boolean('bundle_home')->default(false);
            $table->boolean('bundle_auto')->default(false);
            $table->boolean('bundle_health')->default(false);
            $table->boolean('just_auto')->default(false);

            // Contact Preferences
            $table->string('preferred_language')->nullable(); // e.g., English, Spanish
            $table->string('contact_method')->nullable(); // Phone, Text, Email
            $table->string('best_time_to_connect')->nullable(); // Morning, Afternoon, Evening

            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('auto_quotes');
    }
};
