<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\Siswa;
use App\Models\Guru;
use App\Models\Kelas;
use App\Models\Jurusan;

class DatabaseSeeder extends Seeder
{
    public function run(): void
    {
        // ── JURUSAN ──────────────────────────────────────
        Jurusan::insert([
            ['nama_jurusan' => 'Ilmu Pengetahuan Alam',    'kode_jurusan' => 'IPA', 'deskripsi' => 'Jurusan sains dan matematika',        'created_at' => now(), 'updated_at' => now()],
            ['nama_jurusan' => 'Ilmu Pengetahuan Sosial',  'kode_jurusan' => 'IPS', 'deskripsi' => 'Jurusan sosial dan ekonomi',          'created_at' => now(), 'updated_at' => now()],
            ['nama_jurusan' => 'Teknik Komputer Jaringan', 'kode_jurusan' => 'TKJ', 'deskripsi' => 'Jurusan jaringan dan infrastruktur',  'created_at' => now(), 'updated_at' => now()],
            ['nama_jurusan' => 'Rekayasa Perangkat Lunak', 'kode_jurusan' => 'RPL', 'deskripsi' => 'Jurusan pemrograman dan software',    'created_at' => now(), 'updated_at' => now()],
        ]);

        // ── KELAS ─────────────────────────────────────────
        Kelas::insert([
            ['nama_kelas' => 'X-IPA-1',  'tingkat' => 'X',   'kapasitas' => 32, 'created_at' => now(), 'updated_at' => now()],
            ['nama_kelas' => 'X-IPA-2',  'tingkat' => 'X',   'kapasitas' => 32, 'created_at' => now(), 'updated_at' => now()],
            ['nama_kelas' => 'X-IPS-1',  'tingkat' => 'X',   'kapasitas' => 30, 'created_at' => now(), 'updated_at' => now()],
            ['nama_kelas' => 'XI-RPL-1', 'tingkat' => 'XI',  'kapasitas' => 30, 'created_at' => now(), 'updated_at' => now()],
            ['nama_kelas' => 'XI-TKJ-1', 'tingkat' => 'XI',  'kapasitas' => 30, 'created_at' => now(), 'updated_at' => now()],
            ['nama_kelas' => 'XII-IPA-1','tingkat' => 'XII', 'kapasitas' => 32, 'created_at' => now(), 'updated_at' => now()],
        ]);

        // ── GURU ──────────────────────────────────────────
        Guru::insert([
            ['nama' => 'Drs. Ahmad Fauzi, M.Pd',    'nip' => '196501011990031001', 'mata_pelajaran' => 'Matematika',          'alamat' => 'Jl. Melati No. 12, Jakarta',      'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Siti Rahayu, S.Pd',          'nip' => '197203152000122001', 'mata_pelajaran' => 'Bahasa Indonesia',    'alamat' => 'Jl. Mawar No. 7, Jakarta',        'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Budi Santoso, S.T, M.Kom',  'nip' => '198005202005011002', 'mata_pelajaran' => 'Pemrograman Web',     'alamat' => 'Jl. Kenanga No. 45, Depok',       'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Dewi Kusuma, S.Pd',          'nip' => '198712102010122003', 'mata_pelajaran' => 'Fisika',              'alamat' => 'Jl. Anggrek No. 3, Bogor',        'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Rudi Hermawan, S.Kom',       'nip' => '199001152015011004', 'mata_pelajaran' => 'Jaringan Komputer',   'alamat' => 'Jl. Dahlia No. 22, Bekasi',       'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Nur Aini, S.Pd, M.Pd',      'nip' => '198503282008122002', 'mata_pelajaran' => 'Bahasa Inggris',      'alamat' => 'Jl. Flamboyan No. 8, Tangerang',  'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Hendra Wijaya, S.Pd',        'nip' => '197808122003011005', 'mata_pelajaran' => 'Sejarah Indonesia',   'alamat' => 'Jl. Cempaka No. 15, Jakarta',     'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Rina Marlina, S.Si, M.Si',  'nip' => '198905042014022001', 'mata_pelajaran' => 'Kimia',               'alamat' => 'Jl. Bougenville No. 9, Depok',    'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
        ]);

        // ── SISWA ─────────────────────────────────────────
        Siswa::insert([
            ['nama' => 'Andi Pratama',        'kelas' => 'X-IPA-1',  'nisn' => '0087654321', 'alamat' => 'Jl. Merdeka No. 10, Jakarta',    'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Bintang Cahaya',      'kelas' => 'X-IPA-1',  'nisn' => '0087654322', 'alamat' => 'Jl. Sudirman No. 5, Jakarta',    'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Cantika Dewi',        'kelas' => 'X-IPS-1',  'nisn' => '0087654323', 'alamat' => 'Jl. Thamrin No. 88, Jakarta',    'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Dimas Aditya',        'kelas' => 'XI-RPL-1', 'nisn' => '0087654324', 'alamat' => 'Jl. Gatot Subroto No. 11, Jaksel','jenis_kelamin' => 'Laki-laki', 'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Ella Fitria',         'kelas' => 'XI-RPL-1', 'nisn' => '0087654325', 'alamat' => 'Jl. Rasuna Said No. 3, Jaksel',  'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Fajar Nugroho',       'kelas' => 'XII-IPA-1','nisn' => '0087654326', 'alamat' => 'Jl. Kuningan No. 77, Jakarta',   'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Gina Ramadhani',      'kelas' => 'X-IPA-2',  'nisn' => '0087654327', 'alamat' => 'Jl. Mangga Besar No. 20, Jakbar','jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Hadi Saputra',        'kelas' => 'XI-TKJ-1', 'nisn' => '0087654328', 'alamat' => 'Jl. Pasar Minggu No. 14, Jaksel','jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Indah Lestari',       'kelas' => 'XI-TKJ-1', 'nisn' => '0087654329', 'alamat' => 'Jl. Pondok Indah No. 6, Jaksel', 'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Joko Widiatmoko',     'kelas' => 'XII-IPA-1','nisn' => '0087654330', 'alamat' => 'Jl. TB Simatupang No. 33, Jaksel','jenis_kelamin' => 'Laki-laki', 'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Kartika Sari',        'kelas' => 'X-IPS-1',  'nisn' => '0087654331', 'alamat' => 'Jl. Fatmawati No. 50, Jaksel',   'jenis_kelamin' => 'Perempuan',  'created_at' => now(), 'updated_at' => now()],
            ['nama' => 'Lutfi Hakim',         'kelas' => 'XI-RPL-1', 'nisn' => '0087654332', 'alamat' => 'Jl. Lebak Bulus No. 9, Jaksel',  'jenis_kelamin' => 'Laki-laki',  'created_at' => now(), 'updated_at' => now()],
        ]);
    }
}