<?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('contacts', function (Blueprint $table) {
            $table->string('status', 20)->default('new')->after('message');
            $table->timestamp('read_at')->nullable()->after('status');
            $table->timestamp('replied_at')->nullable()->after('read_at');
            $table->timestamp('notified_at')->nullable()->after('replied_at');
            $table->text('admin_notes')->nullable()->after('notified_at');
        });
    }

    public function down(): void
    {
        Schema::table('contacts', function (Blueprint $table) {
            $table->dropColumn([
                'status',
                'read_at',
                'replied_at',
                'notified_at',
                'admin_notes',
            ]);
        });
    }
};
