<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    public function run(): void
    {
        User::updateOrCreate(
            ['email' => 'admin@pamsimas.com'],
            [
                'name'              => 'Admin PAMSIMAS',
                'password'          => Hash::make('admin123'),
                'role'              => 'admin',
                'status'            => 'aktif',
                'email_verified_at' => now(),
            ]
        );

        echo "✅ Admin berhasil dibuat!\n";
        echo "Email : admin@pamsimas.com\n";
        echo "Pass  : admin123\n";
    }
}