<?php

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class HRSeeder extends Seeder
{
    public function run()
    {
        // Holidays
        DB::table('hr_holidays')->insert([
            ['date' => '2025-01-01', 'name' => 'New Year', 'created_at' => now(), 'updated_at' => now()],
            ['date' => '2025-12-25', 'name' => 'Christmas', 'created_at' => now(), 'updated_at' => now()],
        ]);
        // Time logs
        DB::table('hr_time_log')->insert([
            ['user_id' => 1, 'date' => '2025-07-01', 'hours' => 8, 'created_at' => now(), 'updated_at' => now()],
            ['user_id' => 2, 'date' => '2025-07-01', 'hours' => 7.5, 'created_at' => now(), 'updated_at' => now()],
        ]);
        // User details
        DB::table('hr_user_details')->insert([
            ['user_id' => 1, 'position' => 'Technician', 'department' => 'Support', 'created_at' => now(), 'updated_at' => now()],
            ['user_id' => 2, 'position' => 'Sales', 'department' => 'Sales', 'created_at' => now(), 'updated_at' => now()],
        ]);
        $this->command->info('Seeded HR tables');
    }
} 