<?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('salary_grades', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('code', 20)->nullable()->index()->default(null);
            $table->string('name', 100);
            $table->string('step_1', 100)->nullable();
            $table->string('step_2', 100)->nullable();
            $table->string('step_3', 100)->nullable();
            $table->string('step_4', 100)->nullable();
            $table->string('step_5', 100)->nullable();
            $table->string('step_6', 100)->nullable();
            $table->string('step_7', 100)->nullable();
            $table->string('step_8', 100)->nullable();
            $table->text('description')->nullable()->default(null);
            $table->boolean('enabled')->default(true)->index();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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