<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class UserSeeder extends Seeder
{
    public function run()
    {
        $data = [
            [
                'username'      => 'admin1',
                'password_hash' => password_hash('password123', PASSWORD_DEFAULT),
                'role'          => 'admin',
                'nama_lengkap'  => 'Super Admin',
                'no_hp'         => '081234567890',
            ],
            [
                'username'      => 'kesantrian1',
                'password_hash' => password_hash('password123', PASSWORD_DEFAULT),
                'role'          => 'kesantrian',
                'nama_lengkap'  => 'Ustadz Ahmad',
                'no_hp'         => '081234567891',
            ],
            [
                'username'      => 'satpam1',
                'password_hash' => password_hash('password123', PASSWORD_DEFAULT),
                'role'          => 'satpam',
                'nama_lengkap'  => 'Pak Satpam',
                'no_hp'         => '081234567892',
            ],
            [
                'username'      => 'wali1',
                'password_hash' => password_hash('password123', PASSWORD_DEFAULT),
                'role'          => 'wali',
                'nama_lengkap'  => 'Bapak Budi',
                'no_hp'         => '081234567893',
            ],
        ];

        $this->db->table('users')->insertBatch($data);
    }
}
