<?php

namespace Database\Factories;

use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\message>
 */
class MessageFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition()
    {
        return [
            'title' => $this->faker->word(),
            'content' => $this->faker->paragraph(),
            'author_id' => $this->faker->randomElement(User::pluck('id')),
            'preview'=> $this->faker->word(),
            'tag' => $this->faker->word(),
            'thumbnail' =>  $this->faker->imageUrl(800, 550, 'fake', true),
        ];
    }
}
