01acfa3b40
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled
Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06). Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
55 lines
1.4 KiB
PHP
55 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
/**
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Talk\Model;
|
|
|
|
use OCA\Talk\ResponseDefinitions;
|
|
use OCP\AppFramework\Db\Entity;
|
|
use OCP\DB\Types;
|
|
|
|
/**
|
|
* @method void setUserId(string $userId)
|
|
* @method string getUserId()
|
|
* @method void setToken(string $token)
|
|
* @method string getToken()
|
|
* @method void setMessageId(int $messageId)
|
|
* @method int getMessageId()
|
|
* @method void setDateTime(\DateTime $dateTime)
|
|
* @method \DateTime getDateTime()
|
|
*
|
|
* @psalm-import-type TalkChatReminder from ResponseDefinitions
|
|
*/
|
|
class Reminder extends Entity implements \JsonSerializable {
|
|
public const NUM_UPCOMING_REMINDERS = 10;
|
|
|
|
protected string $userId = '';
|
|
protected string $token = '';
|
|
protected int $messageId = 0;
|
|
protected ?\DateTime $dateTime = null;
|
|
|
|
public function __construct() {
|
|
$this->addType('userId', Types::STRING);
|
|
$this->addType('token', Types::STRING);
|
|
$this->addType('messageId', Types::BIGINT);
|
|
$this->addType('dateTime', Types::DATETIME);
|
|
}
|
|
|
|
/**
|
|
* @return TalkChatReminder
|
|
*/
|
|
#[\Override]
|
|
public function jsonSerialize(): array {
|
|
return [
|
|
'userId' => $this->getUserId(),
|
|
'token' => $this->getToken(),
|
|
'messageId' => $this->getMessageId(),
|
|
'timestamp' => $this->getDateTime()->getTimestamp(),
|
|
];
|
|
}
|
|
}
|