<?php

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

class CreateUsersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('users', function(Blueprint $table)
		{
			$table->bigIncrements('id');
			$table->string('first_name', 32);
			$table->string('last_name', 32);
			$table->string('username', 64)->unique();
			$table->string('password', 64);
			$table->string('email', 128);
			$table->string('mobile', 15);
			$table->boolean('extension')->unsigned()->default(201);
			$table->enum('account_type', array('local', 'domain'))->default('local');
			$table->boolean('active')->default(true);
			$table->boolean('suspended')->default(false);
			$table->timestamp('suspended_time');
			$table->timestamps();
		});
	}

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

}
