addType('pollId', Types::BIGINT); $this->addType('roomId', Types::BIGINT); $this->addType('actorType', Types::STRING); $this->addType('actorId', Types::STRING); $this->addType('displayName', Types::STRING); $this->addType('optionId', Types::INTEGER); } /** * @return TalkPollVote */ public function asArray(): array { return [ // The ids are not needed on the API level but only internally for optimising database queries // 'id' => $this->getId(), // 'pollId' => $this->getPollId(), // 'roomId' => $this->getRoomId(), 'actorType' => $this->getActorType(), 'actorId' => $this->getActorId(), 'actorDisplayName' => $this->getDisplayName(), 'optionId' => $this->getOptionId(), ]; } }