<?php

namespace Database\Seeders;

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

class PerusahaanSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            [
                'NamaPerusahaan' => 'PT. Permata Hijau',
                'Alamat' => 'Jl. Merdeka No. 1, Jakarta Pusat',
            ],
            [
                'NamaPerusahaan' => 'PT. BERKAH SELAMANYA ENERGI (R4)',
                'Alamat' => 'Jl. Sudirman No. 88, Jakarta Selatan',
            ],
            [
                'NamaPerusahaan' => 'PT. FORTUNA MUDA LAGA (FORMULA BAN)',
                'Alamat' => 'Jl. Gatot Subroto No. 12, Jakarta Barat',
            ],
            [
                'NamaPerusahaan' => 'PT. MANDIRI KREASI KOLABORASI',
                'Alamat' => 'Jl. Ahmad Yani No. 45, Jakarta Timur',
            ],
            [
                'NamaPerusahaan' => 'PT. UNILAB PERDANA',
                'Alamat' => 'Kawasan Industri Cikarang, Bekasi',
            ],
        ];

        foreach ($data as $row) {
            Perusahaan::updateOrCreate(
                ['NamaPerusahaan' => $row['NamaPerusahaan']],
                ['Alamat' => $row['Alamat']]
            );
        }
    }
}
