<?php

namespace Database\Seeders;

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

class RoleAssignmentSeeder extends Seeder
{
    public function run(): void
    {
        // Pastikan roles ada di database
        foreach (['admin', 'guru', 'santri'] as $roleName) {
            // Implementasi pengecekan role di database
        }

        // Assign role ke semua user berdasarkan kolom `role`
        foreach (User::all() as $user) {
            if ($user->role) {
                // Implementasi penugasan role kepada user
            }
        }
    }
}
