<?php

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

class CreateShopInvoiceItemsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_invoice_items', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('invoice_id')->nullable();
            $table->integer('product_id')->nullable();
            $table->integer('status')->nullable();
            $table->integer('quantity')->nullable();
            $table->decimal('unit_price', 10);
            $table->integer('tax_id')->nullable();
            $table->integer('raw_price')->nullable();
            $table->integer('tax')->nullable();
            $table->integer('total_price')->nullable();
            $table->decimal('discount_percent')->nullable();
            $table->decimal('discount')->nullable();
            $table->timestamps();
        });
    }

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