<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use App\Models\User;
use Illuminate\Support\Facades\Hash;

class UserSeeder extends Seeder
{
    public function run()
    {
        // Membuat Admin
        User::create([
            'name'     => 'Administrator',
            'username' => 'admin',
            'email'    => 'admin@mail.com',
            'password' => Hash::make('password123'),
            'role'     => 'admin', // Sesuai dengan role di AuthController
        ]);

        // Membuat Siswa
        User::create([
            'name'     => 'Siswa Budi',
            'username' => 'siswa01',
            'email'    => 'budi@mail.com',
            'password' => Hash::make('password123'),
            'role'     => 'siswa',
        ]);
    }
}