<?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('premium_overtime_pay_settings', function (Blueprint $table) {
            $table->id();
            $table->string('code',20);
            $table->string('name',200);
            $table->text('description')->nullable();
            $table->unsignedSmallInteger('percentage')->default(100);
            $table->boolean('isRestday')->default(false);
            $table->boolean('isOvertime')->default(false);
            $table->unsignedSmallInteger('holiday_type_id')->nullable()->index();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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