<?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('guest_visits', function (Blueprint ) {
            ->id();
            ->foreignId('guest_id')->constrained()->onDelete('cascade');
            ->foreignId('venue_id')->constrained()->onDelete('cascade');
            ->datetime('visit_date');
            ->decimal('spend_amount', 10, 2)->nullable();
            ->string('visit_type')->nullable();
            ->string('room_number')->nullable();
            ->text('notes')->nullable();
            ->timestamps();
        });
    }

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

