<?php

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

class CreateCancelBookingsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cancel_bookings', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('booking_id')->nullable();
            $table->string('ms')->nullable();
            $table->boolean('ceo_approval')->default(0);
            $table->boolean('original_receipts')->default(0);
            $table->boolean('original_app_receipts')->default(0);
            $table->boolean('original_file_receipts')->default(0);
            $table->boolean('original_agreement_receipts')->default(0);
            $table->string('missing_documents',500)->nullable();
            $table->double('refund_amount')->nullable();
            $table->double('deduction_amount')->nullable();
            $table->enum('status', ['Approve','Pending'])->default('Pending');
            $table->string('remarks',500)->nullable();
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
        });
    }

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