<?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('discovery_orders', function (Blueprint $table) {
            $table->id();
            $table->string('site_name');
            $table->string('discovery_image');
            $table->string('classe');
            $table->string('lieu_de_rassemblement');
            $table->string('reservation_period');
            $table->decimal('price', 10, 2);
            $table->decimal('total_price', 10, 2);
            $table->string('username');
            $table->string('phone');
            $table->decimal('amount_paid', 10, 2);
            $table->string('invoice_number');
            $table->foreignId('user_id')->constrained()->onDelete('cascade');
            $table->boolean('is_viewed')->default(false);
            $table->timestamps();
        });
    }

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