<?php

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

class CreateBillMasterEmployeePayrollsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bill_master_employee_payrolls', function (Blueprint $table) {
            $table->id();
            $table->integer('u_id')->nullable();
            $table->integer('payroll_id')->nullable();
            $table->integer('item_id')->nullable();
            $table->string('type', 20)->nullable();
            $table->string('ref', 100)->nullable();
            $table->dateTime('date')->nullable();
            $table->date('due_date')->nullable();
            $table->string('trans_type', 100)->nullable();
            $table->longText('details')->nullable();
            $table->double('amount')->nullable();
            $table->string('currency', 10)->nullable();
            $table->string('conversion_rate', 100)->nullable();
            $table->timestamps();
        });
    }

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