<?php

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

class CreatePurchaseInvoicesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('purchase_invoices', function (Blueprint $table) {
            $table->id();
            $table->string('make');
            $table->string('model');
            $table->string('varient');
            $table->string('registration_no')->nullable();
            $table->date('purchase_date');
            $table->decimal('purchase_price', 12, 2);
            $table->string('vendor_name')->nullable();
            $table->string('invoice_file_path')->nullable();
            $table->string('status')->default(0);
            $table->timestamps();
        });
        
    }

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