<?php

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

class JadwalBkSeeder extends Seeder
{

    public function run(): void
    {
        $data = [
            [
                'hari_mulai' => 'Senin',
                'hari_selesai' => 'Jumat',
                'jam' => '08:30',
                'id_guru' => '2',
            ],
            [
                'hari_mulai' => 'Selasa',
                'hari_selesai' => 'Kamis',
                'jam' => '08:30',
                'id_guru' => '4',
            ],
            [
                'hari_mulai' => 'Rabu',
                'hari_selesai' => 'Jumat',
                'jam' => '08:30',
                'id_guru' => '6',
            ],
            [
                'hari_mulai' => 'Rabu',
                'hari_selesai' => 'Kamis',
                'jam' => '08:30',
                'id_guru' => '4',
            ],
            [
                'hari_mulai' => 'Selasa',
                'hari_selesai' => 'Jumat',
                'jam' => '08:30',
                'id_guru' => '5',
            ],
        ];

        foreach ($data as $item) {
            DB::table('jadwals')->insert([
                [
                    'hari_mulai' => $item['hari_mulai'],
                    'hari_selesai' => $item['hari_selesai'],
                    'jam' => $item['jam'],
                    'id_guru' => $item['id_guru'],
                ],
            ]);
        }
    }
}
