<?php

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

class CreateQuotDocApproveTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('quot_doc_approve', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('quot_tax_invoice_id')->nullable()->unsigned();
            $table->foreign('quot_tax_invoice_id')->references('id')->on('quot_tax_invoice');
            $table->boolean('is_complete')->default(0);
            $table->string('ref_no')->nullable();
            $table->enum('status', ['pending', 'approved', 'manual','reject'])->nullable();
            $table->timestamps();
        });
    }

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