1
0
Fork 0
nc_ext_dav_push/lib/Db/Subscription.php
2024-07-23 02:06:10 +02:00

31 lines
No EOL
730 B
PHP

<?php
namespace OCA\DavPush\Db;
use JsonSerializable;
use OCP\AppFramework\Db\Entity;
class Subscription extends Entity implements JsonSerializable {
protected $userId;
protected $collectionName;
protected $transport;
protected $creationTimestamp;
protected $expirationTimestamp;
public function __construct() {
$this->addType('creationTimestamp','integer');
$this->addType('expirationTimestamp','integer');
}
public function jsonSerialize(): array {
return [
'id' => $this->id,
'userId' => $this->userId,
'collectionName' => $this->collectionName,
'transport' => $this->transport,
'creationTimestamp' => $this->creationTimestamp,
'expirationTimestamp' => $this->expirationTimestamp
];
}
}