<?php

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

class CreateAccountsTable extends Migration
{
    /*
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {

        /*
         * Table: accounts
         */
        Schema::create('accounts', function ($table) {
            $table->increments('id');
            $table->integer('booking_id')->nullable();
            $table->integer('payable_id')->nullable();
            $table->string('payable_type', 100)->nullable();
            $table->enum('status', ['debit','credit'])->nullable();
            $table->enum('pay_type', ['Cash','Bank Transfer','Credit card','Draft','Deposit Bond','Bank Deposit','PDC'])->nullable();
            $table->string('pay_no', 255)->nullable();
            $table->date('pay_date')->nullable();
            $table->text('pay_notes')->nullable();
            $table->double('amount', 10,2)->nullable();
            $table->dateTime('date')->nullable();
            $table->text('notes')->nullable();
            $table->text('documents')->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

    /*
    * Reverse the migrations.
    *
    * @return void
    */

    public function down()
    {
        Schema::drop('accounts');
    }
}