<?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::table('payroll_settings', function (Blueprint $table) {
            $table->decimal('overtime_meal_amount', 6, 2)->after('gross_income_formula');
            $table->unsignedSmallInteger('overtime_meal_every_hours')->after('overtime_meal_amount');
            $table->string('overtime_transportation_basis')->after('overtime_meal_every_hours');
            $table->decimal('overtime_transportation_amount', 6, 2)->nullable()->after('overtime_transportation_basis');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('payroll_settings', function (Blueprint $table) {
            $table->dropColumn('overtime_meal_amount');
            $table->dropColumn('overtime_meal_every_hours');
            $table->dropColumn('overtime_transportation_basis');
            $table->dropColumn('overtime_transportation_amount');
        });
    }
};
