<?php

namespace Database\Factories;

use App\Enums\KategoriJenis;
use App\Models\Kategori;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;

/**
 * @extends Factory<Kategori>
 */
class KategoriFactory extends Factory
{
    public function definition(): array
    {
        $nama = fake()->unique()->words(2, true);

        return [
            'nama_kategori' => $nama,
            'judul' => fake()->sentence(),
            'deskripsi' => fake()->paragraph(),
            'alias' => Str::slug($nama),
            'jenis' => fake()->randomElement(KategoriJenis::cases()),
            'viewed' => 0,
            'status' => true,
        ];
    }
}
