<?php

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

class CreateBeneficiaryPaymentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('beneficiary_payments', function (Blueprint $table) {
            $table->id();
            $table->string('district')->nullable();
            $table->Integer('no_of_beneficiaries');
            $table->Integer('ent_amount');
            $table->Integer('service_fee');
            $table->Integer('withdraw_charge');
            $table->Integer('total');
            $table->string('quarter');
            $table->date('pay_date');
            $table->string('fy');
            $table->string('reference');
            $table->foreignId('created_by')->constrained('users')->onUpdate('cascade')->onDelete('cascade');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('beneficiary_payments');
    }
}
