<?php

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

class CreateEmployeesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('employees', function (Blueprint $table) {
            $table->increments('id');
            $table->string('employee_id');
            $table->string('prefix')->nullable();
            $table->string('first_name');
            $table->string('last_name');
            $table->string('middle_name')->nullable();
            $table->string('email_address')->unique();
            $table->string('gender');
            $table->string('role')->nullable();
            $table->string('business_unit')->nullable();
            $table->string('department');
            $table->string('job_title')->nullable();
            $table->string('employment_status');
            $table->date('date_of_joining');
            $table->date('date_of_leaving')->nullable();
            $table->integer('years_of_experience');
<<<<<<< 8c98d41a67e0ec45e1fd64b04b779360352c1dcf
            $table->integer('work_phone', 30)->nullable();
            $table->integer('personal_phone', 30);
            $table->integer('extension', 30)->nullable();
=======
            $table->integer('work_phone')->nullable();
            $table->integer('personal_phone');
            $table->integer('extension')->nullable();
>>>>>>> Storing employee info
            $table->string('kra_pin', 30);
            $table->string('nssf_number', 30);
            $table->string('nhif_number', 30);
            $table->string('ifmis_number', 30)->nullable();
            $table->string('reporting_manager')->nullable();
            $table->string('duration')->nullable();
            $table->string('profile_image')->nullable();
            $table->string('password')->nullable();
            $table->boolean('isAdmin')->nullable();
<<<<<<< 8c98d41a67e0ec45e1fd64b04b779360352c1dcf
=======
            $table->string('disability_type')->nullable();
            $table->string('disability_description')->nullable();
            $table->string('exemption_certificate')->nullable();
>>>>>>> Storing employee info
            $table->integer('created_by')->nullable();
            $table->integer('modified_by')->nullable();
            $table->integer('is_active')->default(1);
            $table->rememberToken();
            $table->timestamps();
        });
    }

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