<?php

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

class CreateVendorsTable extends Migration
{
    /*
     * Run the migrations.
     *
     * @return void
     */

    public function up()
    {

        /*
         * Table: vendors
         */
        Schema::create('vendors', function ($table) {
            $table->increments('id');
            $table->integer('payment_term_id')->nullable();
            $table->integer('currency_id')->nullable();
            $table->integer('gst_scheme_id')->nullable();
            $table->integer('payment_method_id')->nullable();
            $table->string('salution', 30)->nullable();
            $table->string('first_name', 100)->nullable();
            $table->string('last_name', 100)->nullable();
            $table->string('name', 100)->nullable();
            $table->string('display_name', 255)->nullable();
            $table->string('email', 255)->nullable();
            $table->string('phone', 30)->nullable();
            $table->string('mobile', 100)->nullable();
            $table->string('website', 100)->nullable();
            $table->string('password', 100)->nullable();
            $table->string('api_token', 60)->nullable();
            $table->string('remember_token', 255)->nullable();
            $table->string('photo', 500)->nullable();
            $table->string('fax', 100)->nullable();
            $table->double('discount', 10,3)->nullable();
            $table->integer('price_include_tax')->nullable();
            $table->string('carrier', 200)->nullable();
            $table->integer('days')->nullable();
            $table->longText('remarks')->nullable();
            $table->string('facebook', 200)->nullable();
            $table->string('twitter', 200)->nullable();
            $table->enum('status', ['New','Active','Suspended','Locked'])->nullable();
            $table->string('slug', 255)->nullable();
            $table->softDeletes();
            $table->nullableTimestamps();
        });
    }

    /*
    * Reverse the migrations.
    *
    * @return void
    */

    public function down()
    {
        Schema::drop('vendors');
    }
}