<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('invitations', function (Blueprint $table) {
            $table->id();
            $table->unsignedBigInteger('branch_id')->nullable();
            $table->string('title');
            $table->string('occasion')->nullable();      // annual day / graduation / parents meeting …
            $table->date('event_date')->nullable();
            $table->string('event_time')->nullable();
            $table->string('venue')->nullable();
            $table->string('audience')->nullable();       // parents / teachers / students / guests
            $table->string('chief_guest')->nullable();
            $table->text('body')->nullable();
            $table->string('rsvp')->nullable();
            $table->string('status')->default('draft');   // draft / sent
            $table->softDeletes();
            $table->timestamps();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('invitations');
    }
};
