<?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('companies', function (Blueprint $table) {
            // Izinkan karyawan edit lokasi rumah sendiri untuk WFH
            // Default: false (harus diaktifkan oleh admin)
            $table->boolean('allow_employee_edit_home_location')->default(false)->after('qr_scanner_radius');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('companies', function (Blueprint $table) {
            $table->dropColumn('allow_employee_edit_home_location');
        });
    }
};
