2024-06-12 01:50:04 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace OCA\DavPush\Db;
|
|
|
|
|
|
|
|
use JsonSerializable;
|
|
|
|
|
|
|
|
use OCP\AppFramework\Db\Entity;
|
|
|
|
|
|
|
|
class Subscription extends Entity implements JsonSerializable {
|
|
|
|
protected $userId;
|
|
|
|
protected $collectionName;
|
2024-06-12 03:03:35 +02:00
|
|
|
protected $transport;
|
2024-06-12 01:50:04 +02:00
|
|
|
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,
|
2024-06-12 03:03:35 +02:00
|
|
|
'transport' => $this->transport,
|
2024-06-12 01:50:04 +02:00
|
|
|
'creationTimestamp' => $this->creationTimestamp,
|
2024-06-12 03:03:35 +02:00
|
|
|
'expirationTimestamp' => $this->expirationTimestamp
|
2024-06-12 01:50:04 +02:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|