<?php

namespace Database\Seeders;

use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Spatie\Permission\Models\Role;

class RespondenSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        // create new account 1
        $user = User::create([
            'nik' => "3204124512900001",
            'name' => "ABDUL ROHMAH",
            'email' => "abdul.rohmah@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Laki - Laki",
            'place_of_birth' => "Jember",
            'date_of_birth' => "1965-04-13",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);
        
        // create new account 2
        $user = User::create([
            'nik' => "3204124512900002",
            'name' => "MUSLIMAH",
            'email' => "muslimah@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Perempuan",
            'place_of_birth' => "Lumajang",
            'date_of_birth' => "1969-07-01",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);

        // create new account 3
        $user = User::create([
            'nik' => "3204124512900003",
            'name' => "AHMAD KURNIAWAN",
            'email' => "ahmad.kurniawan@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Laki - Laki",
            'place_of_birth' => "Jember",
            'date_of_birth' => "1990-01-25",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);

        // create new account 4
        $user = User::create([
            'nik' => "3204124512900004",
            'name' => "RUDI SAPUTRA",
            'email' => "rudi.saputra@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Laki - Laki",
            'place_of_birth' => "Jember",
            'date_of_birth' => "2000-12-14",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);

        // create new account 5
        $user = User::create([
            'nik' => "3204124512900005",
            'name' => "FITRIANINGSIH",
            'email' => "fitrianingsih@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Perempuan",
            'place_of_birth' => "Jember",
            'date_of_birth' => "2001-03-05",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);

        // create new account 6
        $user = User::create([
            'nik' => "3204124512900006",
            'name' => "SYAKILA NURAINI",
            'email' => "syakila.nuraini@gmail.com",
            'password' => bcrypt("password"),
            'gender' => "Perempuan",
            'place_of_birth' => "Jember",
            'date_of_birth' => "2022-08-09",
        ]);

        // Create role for user
        $role = Role::findOrFail(3); // Pengunjung
        $user->assignRole($role);
    }
}
