<?php

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

class CreateChequesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('cheques', function (Blueprint $table) {
            $table->id();
            $table->uuid('uuid');
            $table->morphs('exporterable');
            $table->morphs('receiverable');
            $table->string('cheque_number')->nullable();
            $table->string('status')->default(0);
            $table->string('price')->default(0);
            $table->dateTime('date_received')->nullable();
            $table->dateTime('checkout_date')->nullable();
            $table->unsignedBigInteger('account_number')->nullable();
            $table->text('image')->nullable();
            $table->timestamps();
        });
    }

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

