<?php

namespace Database\Seeders;

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

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        User::firstOrCreate(
            ['email' => 'admin@lingvpn.id'],
            [
                'username' => 'admin',
                'firstname' => 'Admin',
                'lastname' => 'LingVPN',
                'name' => 'Admin LingVPN',
                'phone' => '081000000000',
                'address1' => 'address1',
                'address2' => 'address2',
                'city' => 'bandung',
                'zip' => '00000',
                'region' => 'Indonesia',
                'password' => Hash::make('passwordlingvpn@2025'),
                'role' => 'admin',
            ]
        );
    }
}
