UserStatus.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\UserStatus\Db;
  8. use OCP\AppFramework\Db\Entity;
  9. /**
  10. * Class UserStatus
  11. *
  12. * @package OCA\UserStatus\Db
  13. *
  14. * @method int getId()
  15. * @method void setId(int $id)
  16. * @method string getUserId()
  17. * @method void setUserId(string $userId)
  18. * @method string getStatus()
  19. * @method void setStatus(string $status)
  20. * @method int getStatusTimestamp()
  21. * @method void setStatusTimestamp(int $statusTimestamp)
  22. * @method bool getIsUserDefined()
  23. * @method void setIsUserDefined(bool $isUserDefined)
  24. * @method string|null getMessageId()
  25. * @method void setMessageId(string|null $messageId)
  26. * @method string|null getCustomIcon()
  27. * @method void setCustomIcon(string|null $customIcon)
  28. * @method string|null getCustomMessage()
  29. * @method void setCustomMessage(string|null $customMessage)
  30. * @method int|null getClearAt()
  31. * @method void setClearAt(int|null $clearAt)
  32. * @method setIsBackup(bool $isBackup): void
  33. * @method getIsBackup(): bool
  34. * @method int getStatusMessageTimestamp()
  35. * @method void setStatusMessageTimestamp(int $statusTimestamp)
  36. */
  37. class UserStatus extends Entity {
  38. /** @var string */
  39. public $userId;
  40. /** @var string */
  41. public $status;
  42. /** @var int */
  43. public $statusTimestamp;
  44. /** @var boolean */
  45. public $isUserDefined;
  46. /** @var string|null */
  47. public $messageId;
  48. /** @var string|null */
  49. public $customIcon;
  50. /** @var string|null */
  51. public $customMessage;
  52. /** @var int|null */
  53. public $clearAt;
  54. /** @var bool $isBackup */
  55. public $isBackup;
  56. /** @var int */
  57. protected $statusMessageTimestamp = 0;
  58. public function __construct() {
  59. $this->addType('userId', 'string');
  60. $this->addType('status', 'string');
  61. $this->addType('statusTimestamp', 'int');
  62. $this->addType('isUserDefined', 'boolean');
  63. $this->addType('messageId', 'string');
  64. $this->addType('customIcon', 'string');
  65. $this->addType('customMessage', 'string');
  66. $this->addType('clearAt', 'int');
  67. $this->addType('isBackup', 'boolean');
  68. $this->addType('statusMessageTimestamp', 'int');
  69. }
  70. }