<?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('super_admins', function (Blueprint $t) {
            $t->enum('role', ['owner', 'admin', 'support', 'sales', 'finance'])
                ->default('support')->after('is_active');
            $t->string('phone', 40)->nullable()->after('email');
            $t->text('notes')->nullable()->after('phone');
        });
    }

    public function down(): void
    {
        Schema::table('super_admins', function (Blueprint $t) {
            $t->dropColumn(['role', 'phone', 'notes']);
        });
    }
};
