<?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('business_inquiries', function (Blueprint $table) {
            $table->text('reply')->nullable()->after('message');
            $table->timestamp('replied_at')->nullable()->after('reply');
        });
        Schema::table('supplier_applications', function (Blueprint $table) {
            $table->timestamp('replied_at')->nullable()->after('notes');
        });
    }

    public function down(): void
    {
        Schema::table('business_inquiries', function (Blueprint $table) {
            $table->dropColumn(['reply', 'replied_at']);
        });
        Schema::table('supplier_applications', function (Blueprint $table) {
            $table->dropColumn('replied_at');
        });
    }
};