<?php

namespace Database\Seeders;

use App\Models\User;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // User::factory(10)->create();

        $classes = [
            //Provinsi
            ProvinsiSeeder::class,
            //Kabupaten
            KabupatenSeeder::class,
            //Kecamatan
            KecamatanSeeder::class,
            //Kelurahan
            KelurahanSeeder::class,

            // Roles And User
            AddRoles::class,
            AddUsers::class,
            AgamaSeeder::class,
            ManagementMasterSeeder::class,

            // Master
            DisabilitasSeeder::class,
            JenjangPendidikanSeeder::class,
            PekerjaanSeeder::class,
            StatusPerkawinanSeeder::class,
            StatusTempatTinggalSeeder::class,
            BantuanPemerintahSeeder::class,

            // Data Responden
            RespondenSeeder::class,
        ];

        foreach ($classes as $kelas)
            $this->call($kelas);
        User::first()->assignRole('Admin');
    }
}
