<?php

namespace Database\Factories;

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

/**
 * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Comment>
 */
class CommentFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition()
    {
        return [
            'writer' => $this->faker->randomElement(User::query()->get('id')),
            'comment' => $this->faker->realText($maxNbChars = 200, $indexSize = 2),
            'blogId' => $this->faker->randomElement(Blog::query()->get('id')),
        ];
    }
}
