<?php

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

class CreateIssueNotesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('issue_notes', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('user_id')->nullable();
            $table->unsignedInteger('au_id')->nullable();
            $table->unsignedInteger('receiver_id')->nullable();
            $table->unsignedInteger('item_id')->nullable();
            $table->unsignedInteger('project_id')->nullable();
            $table->double('quantity')->nullable();
            $table->string('remarks')->nullable();
            $table->string('p_number')->nullable();
            $table->string('floor')->nullable();
            $table->string('type')->nullable();
            $table->timestamp('issue_date')->nullable();
            $table->enum('is_recycle', ['0','1','2'])->default('0');
            $table->timestamps();
        });
    }

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