<?php

namespace Database\Seeders;

// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use App\Models\Category;
use App\Models\Habit;
use App\Models\Entry;
use App\Models\Tag;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;

class DatabaseSeeder extends Seeder
{
    /**
     * Seed the application's database.
     */
    public function run(): void
    {
        Category::factory()
            ->count(5)
            ->create();

        Tag::factory()
            ->count(5)
            ->create();

       User::factory()->create([
            'name' => 'Niisse',
            'email' => 'nisselommerde@gmail.com',
            'password' => Hash::make('Password'),
            'email_verified_at' => now()
        ]);

        Habit::factory()
            ->count(5)
            ->has(Entry::factory()->count(5))
            ->create();
    }
}