<?php

namespace Database\Seeders;

use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class KcdSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $kcds = [
            ['name' => 'KCD Wilayah I Bogor', 'code' => 'KCD-01'],
            ['name' => 'KCD Wilayah II Bogor', 'code' => 'KCD-02'],
            ['name' => 'KCD Wilayah III Cirebon', 'code' => 'KCD-03'],
            ['name' => 'KCD Wilayah IV Cirebon', 'code' => 'KCD-04'],
            ['name' => 'KCD Wilayah V Purwakarta', 'code' => 'KCD-05'],
            ['name' => 'KCD Wilayah VI Karawang', 'code' => 'KCD-06'],
            ['name' => 'KCD Wilayah VII Ciamis', 'code' => 'KCD-07'],
            ['name' => 'KCD Wilayah VIII Kuningan', 'code' => 'KCD-08'],
            ['name' => 'KCD Wilayah IX Sumedang', 'code' => 'KCD-09'],
            ['name' => 'KCD Wilayah X Majalengka', 'code' => 'KCD-10'],
            ['name' => 'KCD Wilayah XI Tasikmalaya', 'code' => 'KCD-11'],
            ['name' => 'KCD Wilayah XII Indramayu', 'code' => 'KCD-12'],
            ['name' => 'KCD Wilayah XIII Subang', 'code' => 'KCD-13'],
        ];

        foreach ($kcds as $kcd) {
            DB::table('kcds')->insert([
                'name' => $kcd['name'],
                'code' => $kcd['code'],
                'is_active' => true,
                'created_at' => now(),
                'updated_at' => now(),
            ]);
        }
    }
}
