<?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('utr_applications', function (Blueprint $table) {
            $table->id(); // auto-incrementing primary key
            $table->unsignedBigInteger('user_id'); // foreign key for the user
            $table->string('your_name'); // name of the applicant
            $table->string('contact_number'); // contact number of the applicant
            $table->longText('your_message'); // message from the applicant
            $table->integer('status'); // status of the application
            $table->timestamps(); // created_at and updated_at fields

            // Optional: Add a foreign key constraint if you have a users table
            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
        });
    }

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