<?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('site_surveys', function (Blueprint $table) {
            $table->id();
            $table->string('inquiry_no')->nullable();
            $table->string('customer_name');
            $table->string('mobile');
            $table->string('city')->nullable();
            $table->string('project_location')->nullable();
            $table->string('structure_type')->nullable(); // A-Frame, Dome Glamp, Prefabricated
            $table->string('covered_area')->nullable();
            $table->integer('number_of_units')->default(1);
            $table->text('brief_requirement')->nullable();
            $table->boolean('site_visit_required')->default(false);
            $table->date('proposed_visit_date')->nullable();
            $table->decimal('site_visit_charges', 10, 2)->nullable();
            $table->decimal('amount_received', 10, 2)->nullable();
            $table->string('payment_method')->nullable();
            $table->string('receipt_no')->nullable();
            $table->enum('status', ['Pending', 'Scheduled', 'Completed', 'Cancelled'])->default('Pending');
            $table->text('remarks')->nullable();
            $table->timestamps();
        });
    }

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