<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $developer = User::create([
            'name' => 'Yoga Pangestu',
            'email' => 'info.pangestuyoga@gmail.com',
            'username' => 'pangestu',
            'password' => Hash::make(config('auth.password_default')),
            'email_verified_at' => now(),
        ]);

        $developer->assignRole(RoleEnum::DEVELOPER->value);
    }
}
