2021-06-27 13:19:26 +02:00
|
|
|
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace OCA\GPodderSync\Db\SubscriptionChange;
|
|
|
|
|
|
|
|
use JsonSerializable;
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
|
|
|
|
class SubscriptionChangeEntity extends Entity implements JsonSerializable {
|
|
|
|
|
|
|
|
protected $url;
|
|
|
|
protected $subscribed;
|
|
|
|
protected $updated;
|
|
|
|
protected $userId;
|
|
|
|
|
|
|
|
public function __construct() {
|
|
|
|
$this->addType('id','integer');
|
|
|
|
$this->addType('subscribed','boolean');
|
|
|
|
}
|
|
|
|
|
2022-11-06 20:24:33 +01:00
|
|
|
/**
|
|
|
|
* @return array<string,mixed>
|
|
|
|
*/
|
2022-11-06 20:19:30 +01:00
|
|
|
public function jsonSerialize(): array {
|
2021-06-27 13:19:26 +02:00
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'url' => $this->url,
|
|
|
|
'subscribed' => $this->subscribed,
|
|
|
|
'updated' => $this->updated,
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|