<?php

namespace Database\Factories;

use Illuminate\Database\Eloquent\Factories\Factory;

class ArticleFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        $category = [
            "K-Food" => "K-Food",
            "K-Drama" => "K-Drama",
            "K-Beauty" => "K-Beauty",
            "K-Fashion" => "K-Fashion",
            "News & Event" => "News & Event",
        ];

        return [
            "thumbnail" => "seeder/placeholder.png",
            "title" => $this->faker->word(),
            "slug" => $this->faker->slug,
            "category" => $category[array_rand($category)],
            "preview" => $this->faker->text(200),
            "body" => $this->faker->text(300),
            "is_highlight" => $this->faker->boolean,
            "is_visible" => $this->faker->boolean,
            "published_at" => $this->faker->dateTimeBetween("-1 month", "now"),
            "created_by" => $this->faker->name,
            "updated_by" => $this->faker->name,
        ];
    }
}
