<?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('events', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->text('description');
            $table->enum('type', ['tasting', 'harvest_festival', 'vineyard_tour']);
            $table->date('event_date');
            $table->time('event_time');
            $table->integer('capacity');
            $table->decimal('price_per_person', 8, 2);
            $table->enum('status', ['upcoming', 'cancelled', 'completed'])->default('upcoming');
            $table->string('location')->nullable();
            $table->timestamps();
        });
    }

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