<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Carbon\Carbon;

class SiswaSeeder extends Seeder
{
    public function run()
    {
        $now = Carbon::now();
        
        // Data 10 siswa untuk Kelas 4A
        $siswa = [
            ['nis' => '26001', 'nama' => 'Ahmad Budi Santoso', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26002', 'nama' => 'Bunga Citra Ayu', 'jk' => 'P', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26003', 'nama' => 'Candra Wijaya', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26004', 'nama' => 'Dewi Sartika Putri', 'jk' => 'P', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26005', 'nama' => 'Eko Prasetyo', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26006', 'nama' => 'Fahmi Reza', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26007', 'nama' => 'Gita Savitri', 'jk' => 'P', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26008', 'nama' => 'Hadi Sucipto', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26009', 'nama' => 'Intan Permatasari', 'jk' => 'P', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
            ['nis' => '26010', 'nama' => 'Joko Anwar', 'jk' => 'L', 'kelas' => '4A', 'created_at' => $now, 'updated_at' => $now],
        ];

        // Memasukkan data ke dalam tabel 'siswas'
        DB::table('siswas')->insert($siswa);
    }
}