<?php

namespace Database\Seeders;

use App\Models\TingkatSekolah;
use Illuminate\Database\Seeder;

class TingkatSekolahSeeder extends Seeder
{
    public function run(): void
    {
        $data = [
            ['nama' => 'MI',  'kode' => 'mi',  'urutan' => 1],
            ['nama' => 'MTs', 'kode' => 'mts', 'urutan' => 2],
            ['nama' => 'MA',  'kode' => 'ma',  'urutan' => 3],
        ];

        foreach ($data as $item) {
            TingkatSekolah::firstOrCreate(['kode' => $item['kode']], $item);
        }
    }
}
