nextcloud-gpodder/lib/Db/EpisodeAction/EpisodeActionEntity.php

65 lines
1.6 KiB
PHP
Raw Normal View History

<?php
declare(strict_types=1);
namespace OCA\GPodderSync\Db\EpisodeAction;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
/**
* @method string getPodcast()
2021-10-18 10:55:00 +02:00
* @method void setPodcast(string $podcast)
* @method string getEpisode()
2021-10-18 10:55:00 +02:00
* @method void setEpisode(string $episode)
* @method string getAction()
2021-10-18 10:55:00 +02:00
* @method void setAction(string $action)
* @method integer getTimestampEpoch()
2021-10-18 10:55:00 +02:00
* @method void setTimestampEpoch(mixed $timestampEpoch)
* @method integer getStarted()
2021-10-18 10:55:00 +02:00
* @method void setStarted(integer $started)
* @method integer getPosition()
2021-10-18 10:55:00 +02:00
* @method void setPosition(integer $position)
* @method integer getTotal()
2021-10-18 10:55:00 +02:00
* @method void setTotal(integer $total)
* @method string getGuid()
2021-10-18 10:55:00 +02:00
* @method void setGuid(string $guid)
* @method string getUserId()
2021-10-18 10:55:00 +02:00
* @method void setUserId(string $userId)
*/
class EpisodeActionEntity extends Entity implements JsonSerializable {
protected $podcast;
protected $episode;
protected $action;
protected $position;
protected $started;
protected $total;
protected $timestamp;
protected $timestampEpoch;
protected $guid;
protected $userId;
public function __construct() {
$this->addType('id','integer');
$this->addType('started','integer');
$this->addType('position','integer');
$this->addType('total','integer');
$this->addType('timestampEpoch','integer');
}
public function jsonSerialize(): array {
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' => $this->timestampEpoch,
];
}
}