<?php

namespace Database\Factories;

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

/**
 * @extends Factory<Message>
 */
class MessageFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'subject' => fake()->sentence(),
            'from' => fake()->name().' <'.fake()->safeEmail().'>',
            'to' => fake()->safeEmail(),
            'body' => fake()->paragraphs(3, true),
            'attachments' => null,
            'is_seen' => fake()->boolean(20), // 20% chance of being seen
            'created_at' => now(),
            'updated_at' => now(),
        ];
    }
}
