<?php

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

class CreateRfqPaymentTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('rfq_payment', function (Blueprint $table) {
            $table->id();
            $table->bigInteger('rfq_supplier_id')->nullable()->unsigned();
            $table->foreign('rfq_supplier_id')->references('id')->on('rfq_suppliers');
            $table->double('amount')->nullable();
            $table->boolean('is_really_given')->default(0);
            $table->timestamps();
        });
    }

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