addType('id','integer'); } public function jsonSerialize() { return [ 'id' => $this->id, 'podcast' => $this->podcast, 'episode' => $this->episode, 'guid' => $this->guid, 'action' => $this->action, 'position' => $this->position, 'started' => $this->started, 'total' => $this->total, 'timestamp' => (new \DateTime($this->timestamp))->format("Y-m-d\TH:i:s"), 'timestamp_epoch' => $this->timestampEpoch, ]; } }