<?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('dealers', function (Blueprint $table): void {
            $table->string('business_registration_number', 100)->nullable()->after('domain');
            $table->string('vat_number', 100)->nullable()->after('business_registration_number');
            $table->string('address', 255)->nullable()->after('vat_number');
            $table->string('telephone', 50)->nullable()->after('address');
            $table->string('contact_email', 255)->nullable()->after('telephone');
            $table->string('main_contact_name', 255)->nullable()->after('contact_email');
            $table->string('main_contact_cell', 50)->nullable()->after('main_contact_name');
            $table->string('main_contact_email', 255)->nullable()->after('main_contact_cell');
        });
    }

    public function down(): void
    {
        Schema::table('dealers', function (Blueprint $table): void {
            $table->dropColumn([
                'business_registration_number',
                'vat_number',
                'address',
                'telephone',
                'contact_email',
                'main_contact_name',
                'main_contact_cell',
                'main_contact_email',
            ]);
        });
    }
};

