<?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('meetings', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('user_id');
            $table->unsignedBigInteger('participant_id'); // User ID of the participant
            $table->dateTime('scheduled_at'); // Date and time of the meeting
            $table->string('meeting_url')->nullable(); // Location of the meeting (e.g., online, in-person)
            $table->enum('status', ['scheduled', 'completed', 'cancelled'])->default('scheduled'); // Status of the meeting
            $table->enum('platform', ['zoom', 'google_meet', 'microsoft_teams', 'in_person'])->default('zoom'); // Platform used for the meeting
            $table->text('notes')->nullable(); // Additional notes or agenda for the meeting
            $table->timestamps();
        });
    }

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