<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class SeedPayrollComponents extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // Standard Additions
        $additions = [
            'HRA' => 'House Rent Allowance (Usually 40% of basic)',
            'Special Allowance' => 'Standard special allowance component',
            'Conveyance' => 'Fixed conveyance allowance',
            'Medical' => 'Fixed medical allowance',
            'LTA' => 'Leave Travel Allowance',
            'Other Allowance' => 'Additional allowance component'
        ];

        foreach ($additions as $name => $desc) {
            \App\Models\AdditionType::firstOrCreate(['name' => $name], ['description' => $desc]);
        }

        // Standard Deductions
        $deductions = [
            'ESIC (Employee)' => 'Employee contribution to ESIC (0.75%)',
            'Professional Tax' => 'Professional Tax deduction',
            'Income Tax' => 'Income Tax (TDS) deduction',
            'Gratuity' => 'Gratuity contribution',
            'ESIC (Employer)' => 'Employer contribution to ESIC (3.25%)'
        ];

        foreach ($deductions as $name => $desc) {
            \App\Models\DeductionType::firstOrCreate(['name' => $name], ['description' => $desc]);
        }
    }

}
