<?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('customers', function (Blueprint $table) {
            $table->id();
            $table->string('type'); // 'loyalty' or 'guide'
            $table->string('full_name');
            $table->string('preferred_name')->nullable();
            $table->string('mobile');
            $table->string('email')->nullable();
            $table->date('dob')->nullable();
            $table->date('anniversary_date')->nullable();
            $table->string('gender')->nullable(); // Male, Female, Prefer not to say
            $table->string('country')->default('Sri Lanka');
            $table->string('city')->nullable();
            $table->string('occupation')->nullable();
            $table->string('preferred_contact_method')->nullable(); // SMS, Email, WhatsApp
            $table->boolean('is_marketing_agreed')->default(false);
            $table->string('tour_company_name')->nullable();
            $table->timestamps();
        });
    }

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