<?php

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

class CreateInvoiceForCompaniesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('invoice_for_companies', function (Blueprint $table) {
            $table->id();
            $table->integer('company_id');
            $table->string('invoice_no');
            $table->string('date');
            $table->decimal('total', 15, 2);
            $table->decimal('paid', 15, 2);
            $table->decimal('due', 15, 2);
            $table->integer('status');
            $table->timestamps();
        });
    }

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