<?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('employee_approvers', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('employee_id'); // The employee being recommended
            $table->unsignedBigInteger('signatory_id'); // The recommender
            $table->string('attendance_type', 25); // The recommender
            $table->integer('attendance_id'); // The recommender
            $table->boolean('is_approver')->default(false); // Is this person an approver?
            $table->softDeletes();
            $table->timestamps();
        });
    }

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