<?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('ulasan_pegawais', function (Blueprint $table) {
            $table->id();
            $table->integer('lesen_penjaja_id');
            $table->integer('borang_ulasan_ik_id');
            $table->integer('pegawai_id')->nullable();
            $table->string('pegawai_jawatan')->nullable();
            $table->dateTime('dt_pegawai_ulas', precision: 0)->nullable();
            $table->enum('pegawai_cadangan', ['tiada halangan','tidak menyokong', 'ditangguhkan untuk tindakan/siasatan semula'])->nullable();
            $table->string('pegawai_syarat')->nullable();
            $table->enum('pegawai_notis_perlu_dipatuhi', ['0','1'])->nullable();
            $table->string('pegawai_tidak_menyokong_sebab')->nullable();
            $table->enum('pegawai_dirujuk_unit_penguatkuasa', ['0','1'])->nullable();
            $table->text('pegawai_catatan')->nullable();
            $table->integer('pengarah_id')->nullable();
            $table->string('pengarah_jawatan')->nullable();
            $table->dateTime('dt_pengarah_ulas', precision: 0)->nullable();
            $table->enum('pengarah_ulasan', ['dipertimbangkan', 'ditolak', 'ditangguhkan'])->nullable();
            $table->enum('pengarah_bawa_mesyuarat', ['0', '1'])->nullable();
            $table->enum('pengarah_ditolak_sebab', ['pemohon gagal mematuhi syarat', 'perniagaan dijalankan bukan seperti dipohon'])->nullable();
            $table->text('pengarah_catatan')->nullable();
            $table->timestamps();
        });
    }

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