<?php

namespace App\Database\Seeds;

use CodeIgniter\Database\Seeder;

class BarberExtrasSeeder extends Seeder
{
    public function run()
    {
        $this->db->table('users')->insertBatch([
            ['username' => 'owner', 'password' => password_hash('owner123', PASSWORD_DEFAULT), 'name' => 'Owner Barber', 'role' => 'owner', 'created_at' => date('Y-m-d H:i:s')],
            ['username' => 'kasir', 'password' => password_hash('kasir123', PASSWORD_DEFAULT), 'name' => 'Kasir Barber', 'role' => 'cashier', 'created_at' => date('Y-m-d H:i:s')],
        ]);

        $this->db->table('items')->insertBatch([
            ['name' => 'Pomade', 'price' => 120000, 'type' => 'product', 'created_at' => date('Y-m-d H:i:s')],
            ['name' => 'Shampoo', 'price' => 45000, 'type' => 'product', 'created_at' => date('Y-m-d H:i:s')],
            ['name' => 'Hair Serum', 'price' => 95000, 'type' => 'product', 'created_at' => date('Y-m-d H:i:s')],
        ]);

        $this->db->table('barbers')->insertBatch([
            ['name' => 'Andi', 'created_at' => date('Y-m-d H:i:s')],
            ['name' => 'Budi', 'created_at' => date('Y-m-d H:i:s')],
            ['name' => 'Citra', 'created_at' => date('Y-m-d H:i:s')],
        ]);
    }
}
