<?php

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

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('non_personnel_employees', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('u_id');
            $table->string('employee_id',25);
            $table->string('firstname',50);
            $table->string('middlename',50);
            $table->string('lastname',50);
            $table->string('position',50);
            $table->string('email',100)->nullable();
            $table->string('mobile',50)->nullable();
            $table->string('mobile_2',50)->nullable();
            $table->integer('company_id');
            $table->integer('dealer_id');
            $table->integer('department_id');
            $table->integer('enabled');
            $table->string('date',10);
            $table->integer("work_location_id")->index()->nullable();
            $table->integer("charge_to")->index()->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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