<?php

namespace Modules\HR\Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Modules\Core\Database\Seeders\Traits\DisableForeignKeys;

use Modules\Core\Enums\StatusEnum;
use Modules\HR\Enums\CalculationTypeEnum;
use Modules\HR\Models\HolidayAllowancePolicy;

class HolidayAllowancePolicySeeder extends Seeder
{
    use DisableForeignKeys, WithoutModelEvents;

    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $this->disableForeignKeys();

        HolidayAllowancePolicy::truncate();

        HolidayAllowancePolicy::create([
            'name'               => 'ICU Nurses Eid Premium',
            'calculation_type'   => CalculationTypeEnum::MULTIPLIER,
            'amount'             => 0.00,
            'multiplier'         => 2.00,
            'status'             => StatusEnum::ACTIVE,
        ]);


        $this->enableForeignKeys();
    }
}
