addType('id', 'integer'); $this->addType('botId', 'integer'); $this->addType('talkMessageId', 'integer'); $this->addType('replyTargetMessageId', 'integer'); $this->addType('threadRootMessageId', 'integer'); $this->addType('startedAt', 'integer'); $this->addType('finishedAt', 'integer'); $this->addType('durationMs', 'integer'); $this->addType('toolCallCount', 'integer'); $this->addType('eventCount', 'integer'); $this->addType('promptTokenCount', 'integer'); $this->addType('completionTokenCount', 'integer'); $this->addType('totalTokenCount', 'integer'); $this->addType('createdAt', 'integer'); $this->addType('updatedAt', 'integer'); } public function jsonSerialize(): array { return [ 'id' => $this->id, 'user_id' => $this->userId, 'bot_id' => $this->botId, 'bot_mention_name' => $this->botMentionName, 'room_token' => $this->roomToken, 'talk_message_id' => $this->talkMessageId, 'reply_target_message_id' => $this->replyTargetMessageId, 'thread_root_message_id' => $this->threadRootMessageId, 'source' => $this->source, 'status' => $this->status, 'user_message_preview' => $this->userMessagePreview, 'error_summary' => $this->errorSummary, 'started_at' => $this->startedAt, 'finished_at' => $this->finishedAt, 'duration_ms' => $this->durationMs, 'tool_call_count' => $this->toolCallCount, 'event_count' => $this->eventCount, 'prompt_token_count' => $this->promptTokenCount, 'completion_token_count' => $this->completionTokenCount, 'total_token_count' => $this->totalTokenCount, 'created_at' => $this->createdAt, 'updated_at' => $this->updatedAt, ]; } }