<?php

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

class CreateSystemUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasTable('system_users')) {
            Schema::create('system_users', function (Blueprint $table) {
                $table->id('id');
                $table->string('firstname');
                $table->string('lastname');
                $table->string('emailaddress');
                $table->string('designation');
                $table->string('phone');
                $table->string('password');
                $table->string('status');
                $table->string('merchant_id');
                $table->string('privillages');
                $table->timestamps();
            });
        }
    }

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