<?php

namespace Database\Seeders;

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

class DatabaseSeeder extends Seeder
{
    use WithoutModelEvents;

    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        // Seeding Suami (Admin)
        User::create([
            'name' => 'Rizki (Suami)',
            'email' => 'rizki@family.com',
            'role' => 'suami',
            'password' => bcrypt('password'),
        ]);

        // Seeding Istri (User)
        User::create([
            'name' => 'Dewi (Istri)',
            'email' => 'dewi@family.com',
            'role' => 'istri',
            'password' => bcrypt('password'),
        ]);

        // Seeding Categories
        $this->call(CategorySeeder::class);
    }
}
