<?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('leave_types', function (Blueprint $row) {
            $row->id();
            $row->string('name');
            $row->string('color')->default('#3b82f6'); // Default blue-500
            $row->string('icon')->default('Calendar');
            $row->boolean('is_paid')->default(true);
            $row->integer('default_allowance')->default(0);
            $row->boolean('status')->default(true);
            $row->timestamps();
        });
    }

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