<?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('claim_service_benefits', function (Blueprint $table) {
            $table->integer('amount_incurred')->default(0)->after('benefit_id');
            $table->integer('amount_approved')->default(0)->after('amount_incurred');
            $table->integer('amount_not_approved')->default(0)->after('amount_approved');
            $table->integer('excess_paid')->default(0)->after('amount_not_approved');
        });
    }

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