<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('claims', function (Blueprint $table) {
            $table->string('benefit_code')->after('organization_id');
            $table->string('benefit_desc')->after('benefit_code');
            $table->integer('amount_incurred')->after('benefit_desc');
            $table->integer('amount_approved')->after('amount_incurred');
            $table->integer('amount_not_approved')->after('amount_approved');
            $table->integer('excess_paid')->after('amount_not_approved');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('claims', function (Blueprint $table) {
            $table->dropColumn('benefit_code');
            $table->dropColumn('benefit_desc');
            $table->dropColumn('amount_incurred');
            $table->dropColumn('amount_approved');
            $table->dropColumn('amount_not_approved');
            $table->dropColumn('excess_paid');
        });
    }
};
