<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

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

        User::factory()->create([
            'id_user' => Str::uuid(),
            'name' => 'Test Admin',
            'email' => 'admin@gmail.com',
            'password' => password_hash('admin1234', PASSWORD_BCRYPT, ['cost' => 12]),
            'role' => 'admin',
            'alamat' => 'Jember'
        ]);

        User::factory()->create([
            'id_user' => Str::uuid(),
            'name' => 'Test Psikolog',
            'email' => 'psikolog@gmail.com',
            'password' => password_hash('psikolog1234', PASSWORD_BCRYPT, ['cost' => 12]),
            'role' => 'psikolog',
            'alamat' => 'Jember'
        ]);

        User::factory()->create([
            'id_user' => Str::uuid(),
            'name' => 'Test User',
            'email' => 'user@gmail.com',
            'password' => password_hash('user1234', PASSWORD_BCRYPT, ['cost' => 12]),
            'role' => 'user',
            'alamat' => 'Jember'
        ]);
    }
}
