<?php

namespace Database\Seeders;

use App\Models\Position;
use Illuminate\Database\Seeder;

class PositionSeeder extends Seeder
{
    public function run(): void
    {
        $positions = [
            ['name' => 'Software Engineer', 'code' => 'SE', 'description' => 'Pengembang Aplikasi'],
            ['name' => 'HR Manager', 'code' => 'HRM', 'description' => 'Kepala Divisi SDM'],
            ['name' => 'HR Specialist', 'code' => 'HRS', 'description' => 'Spesialis Rekrutmen dan Absensi'],
            ['name' => 'Finance Staff', 'code' => 'FINS', 'description' => 'Staf Pembukuan dan Keuangan'],
            ['name' => 'Marketing Specialist', 'code' => 'MKTS', 'description' => 'Spesialis Pemasaran'],
            ['name' => 'Operations Supervisor', 'code' => 'OPSV', 'description' => 'Supervisor Operasional Lapangan'],
        ];

        foreach ($positions as $pos) {
            Position::firstOrCreate(['name' => $pos['name']], $pos);
        }
    }
}
