<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('staff_info', function (Blueprint $table) {
            $table->id();
            $table->unsignedInteger('fk_lkp_country')->nullable();
            $table->unsignedInteger('fk_lkp_state')->nullable();
            $table->integer('fk_users')->nullable();
            $table->string('ic_no', 15)->nullable();
            $table->string('email', 55)->nullable();
            $table->string('staff_id', 55)->nullable();
            $table->string('user_name', 50)->nullable();
            $table->string('fullname', 255)->nullable();
            $table->integer('salary_no')->nullable();
            $table->date('dob')->nullable();
            $table->string('add1', 155)->nullable();
            $table->string('add2', 155)->nullable();
            $table->string('add3', 155)->nullable();
            $table->string('postcode', 5)->nullable();
            $table->string('town', 100)->nullable();
            $table->string('tel_o', 20)->nullable();
            $table->string('tel_h', 20)->nullable();
            $table->string('tel_m', 20)->nullable();
            $table->string('gender', 5)->nullable();
            $table->string('nationality', 50)->nullable();
            $table->string('marital_status', 5)->nullable();
            $table->string('religion', 5)->nullable();
            $table->string('title', 20)->nullable();
            $table->integer('card_color')->nullable();
            $table->string('rfid', 20)->nullable();
            $table->string('status', 11)->nullable();
            $table->integer('flag_pm')->nullable();
            $table->date('start_date')->nullable();
            $table->date('end_date')->nullable();
            $table->integer('created_by')->nullable();
            $table->integer('updated_by')->nullable();
            $table->timestamps();
            $table->softDeletes();
            $table->integer('staff_ind')->nullable();
            $table->integer('category')->nullable();
            $table->integer('fk_lkp_department')->nullable();
            $table->integer('penyokong')->nullable();
            $table->integer('pelulus')->nullable();
            $table->integer('flag_replace')->nullable();
        });
    }

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