<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;

class EmployeeSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $employees = [
            [
                'nik'            => '3301041980051043',
                'name'           => 'Imam Hidayat',
                'tempat_lahir'   => 'Ponorogo',
                'tanggal_lahir'  => '1980-05-10',
                'email'          => 'imam.hidayat@desapelem.com',
                'role'           => 'admin',
                'jabatan'        => 'Kepala Desa',
                'phone'          => '085637567652',
                'no_telepon'     => '085637567652',
                'employee_id'    => 'EMP001',
                'status'         => 'aktif',
                'address'        => 'Desa Pelem, Kecamatan Pelem, Kabupaten Ponorogo',
                'alamat'         => 'Desa Pelem, Kecamatan Pelem, Kabupaten Ponorogo',
                'hire_date'      => '2020-01-15',
                'jenis_kelamin'  => 'Laki-laki',
                'url_photo'      => null,
                'password'       => Hash::make('password123'),
            ],
        ];

        foreach ($employees as $employee) {
            User::create($employee);
        }

        $this->command->info('Employee data seeded successfully!');
    }
}
