<?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('users', function (Blueprint $table) {
            $table->decimal('gaji_pokok', 12, 2)->default(0)->after('address');
            $table->decimal('insentif_3kg', 12, 2)->default(500)->after('gaji_pokok');
            $table->decimal('insentif_12kg', 12, 2)->default(5000)->after('insentif_3kg');
            $table->decimal('uang_makan_harian', 12, 2)->default(0)->after('insentif_12kg');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('users', function (Blueprint $table) {
            $table->dropColumn(['gaji_pokok', 'insentif_3kg', 'insentif_12kg', 'uang_makan_harian']);
        });
    }
};
