<?php

namespace Database\Seeders;

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

class JadwalSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $data = [
            [
                'kategori_jadwal' => 'Psikolog',
                'hari_mulai' => 'Senin',
                'hari_selesai' => 'Jumat',
                'jam_mulai' => '08:00:00',
                'jam_selesai' => '13:00:00',
                'id_spesialis_kejiwaan' => '1',
            ],
            [
                'kategori_jadwal' => 'Psikiater',
                'hari_mulai' => 'Senin',
                'hari_selesai' => 'Sabtu',
                'jam_mulai' => '08:00:00',
                'jam_selesai' => '14:00:00',
                'id_spesialis_kejiwaan' => '2',
            ],
        ];

        foreach ($data as $item) {
            DB::table('jadwaljiwas')->insert([
                [
                    'kategori_jadwal' => $item['kategori_jadwal'],
                    'hari_mulai' => $item['hari_mulai'],
                    'hari_selesai' => $item['hari_selesai'],
                    'jam_mulai' => $item['jam_mulai'],
                    'jam_selesai' => $item['jam_selesai'],
                    'id_spesialis_kejiwaan' => $item['id_spesialis_kejiwaan'],
                ],
            ]);
        }
    }
}
