<?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()
{
    Schema::table('izin_penerimaan_tamu', function (Blueprint $table) {
        $table->timestamp('jam_masuk')->nullable()->after('lokasi_penerimaan');
        $table->timestamp('jam_keluar')->nullable()->after('jam_masuk');
        $table->integer('jumlah_tamu')->default(1)->after('jam_keluar');
        $table->enum('jenis_tamu', ['Customer', 'Supplier', 'Kedinasan', 'Tamu BOD'])->nullable()->after('jumlah_tamu');
    });
}

public function down()
{
    Schema::table('izin_penerimaan_tamu', function (Blueprint $table) {
        $table->dropColumn(['jam_masuk', 'jam_keluar', 'jumlah_tamu', 'jenis_tamu']);
    });
}

};
