<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('casos', function (Blueprint $table) {
            $table->string('ramo')->default('VH 07')->after('numero_reclamo');
            $table->string('broker_ruc')->nullable()->after('broker_id');
            $table->string('broker_email')->nullable()->after('broker_ruc');
            $table->string('broker_telefono')->nullable()->after('broker_email');
            $table->string('ejecutivo_email')->nullable()->after('ejecutivo_id');
            $table->string('ejecutivo_celular')->nullable()->after('ejecutivo_email');
            $table->string('aviso_siniestro_path')->nullable()->after('observaciones');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('casos', function (Blueprint $table) {
            $table->dropColumn([
                'ramo',
                'broker_ruc',
                'broker_email',
                'broker_telefono',
                'ejecutivo_email',
                'ejecutivo_celular',
                'aviso_siniestro_path',
            ]);
        });
    }
};
