<?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::table('patients', function (Blueprint $table) {
            $table->string('whatsapp')->nullable()->after('phone');
            $table->string('national_id')->nullable()->after('whatsapp');
            $table->string('referral_source')->nullable()->after('national_id');
            $table->enum('status', ['active', 'inactive'])->default('active')->after('notes');
        });
    }

    public function down(): void
    {
        Schema::table('patients', function (Blueprint $table) {
            $table->dropColumn(['whatsapp', 'national_id', 'referral_source', 'status']);
        });
    }
};
