<?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('users', function (Blueprint $table) {
            $table->string('company_name')->nullable();
            $table->string('business_type')->nullable(); // e.g., Trading Company, Manufacturer
            $table->integer('established_year')->nullable();
            $table->text('company_overview')->nullable();
            
            // Dynamic stats (Sellers can update these, or you can automate them later)
            $table->string('response_time')->default('≤4h');
            $table->string('response_rate')->default('98.5%');
            $table->string('reorder_rate')->default('24%');
        });
    }

    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn([
                'company_name', 'business_type', 'established_year', 'company_overview',
                'response_time', 'response_rate', 'reorder_rate'
            ]);
        });
    }
};