public function toArray()
    {
        $data = array(
            self::ID         => $this->id,
            self::STATUS     => $this->status,
            self::START_TIME => $this->startTime->getTimestamp(),
        );

        if (! is_null($this->endTime)) {
            $data[self::END_TIME] = $this->endTime->getTimestamp();
        }

        return $data;
    }