Task::factory(), 'body' => fake()->paragraph(), 'author_type' => fake()->randomElement(TaskComment::AUTHOR_TYPES), 'author_name' => fake()->name(), ]; } public function fromUser(): static { return $this->state(fn () => [ 'author_type' => 'user', 'author_name' => fake()->name(), ]); } public function fromAI(): static { return $this->state(fn () => [ 'author_type' => 'ai', 'author_name' => fake()->randomElement(['AI Assistant', 'ChatBot', 'Virtual Helper']), ]); } public function fromSystem(): static { return $this->state(fn () => [ 'author_type' => 'system', 'author_name' => fake()->randomElement(['System', 'Automation', 'Scheduler']), ]); } public function forTask(Task $task): static { return $this->state(fn () => [ 'task_id' => $task->id, ]); } }