<?php

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

class CreateHrUserDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('hr_user_details', function (Blueprint $table) {
            $table->integer('user_id')->unsigned()->primary();
            $table->string('national_insurance', 15)->nullable();
            $table->string('address')->nullable();
            $table->string('address2')->nullable();
            $table->string('postcode')->nullable();
            $table->float('rate_per_hour')->default(7);
            $table->integer('annual_leaves')->unsigned()->default(28);
            $table->string('default_start_time', 5)->default('09:00');
            $table->string('default_end_time', 5)->default('17:00');
            $table->timestamps();
        });
    }

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