<?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_gratuities', function (Blueprint $table) {
            $table->id();

            // Employee number change tracking
            $table->string('previous_employee_id')->nullable();
            $table->string('current_employee_id');

            // Dates
            $table->date('effective_date');     // Date
            $table->date('gratuity_date');      // Gratuity Date

            $table->string('remarks')->nullable();

            $table->boolean('active')->default(true);

            $table->timestamps();

        });

    }

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