1
0

UserStatus.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2020, Georg Ehrke
  5. *
  6. * @author Georg Ehrke <oc.list@georgehrke.com>
  7. *
  8. * @license GNU AGPL version 3 or any later version
  9. *
  10. * This program is free software: you can redistribute it and/or modify
  11. * it under the terms of the GNU Affero General Public License as
  12. * published by the Free Software Foundation, either version 3 of the
  13. * License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU Affero General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Affero General Public License
  21. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  22. *
  23. */
  24. namespace OCA\UserStatus\Db;
  25. use OCP\AppFramework\Db\Entity;
  26. /**
  27. * Class UserStatus
  28. *
  29. * @package OCA\UserStatus\Db
  30. *
  31. * @method int getId()
  32. * @method void setId(int $id)
  33. * @method string getUserId()
  34. * @method void setUserId(string $userId)
  35. * @method string getStatus()
  36. * @method void setStatus(string $status)
  37. * @method int getStatusTimestamp()
  38. * @method void setStatusTimestamp(int $statusTimestamp)
  39. * @method bool getIsUserDefined()
  40. * @method void setIsUserDefined(bool $isUserDefined)
  41. * @method string getMessageId()
  42. * @method void setMessageId(string|null $messageId)
  43. * @method string getCustomIcon()
  44. * @method void setCustomIcon(string|null $customIcon)
  45. * @method string getCustomMessage()
  46. * @method void setCustomMessage(string|null $customMessage)
  47. * @method int getClearAt()
  48. * @method void setClearAt(int|null $clearAt)
  49. * @method setIsBackup(bool $true): void
  50. * @method getIsBackup(): bool
  51. */
  52. class UserStatus extends Entity {
  53. /** @var string */
  54. public $userId;
  55. /** @var string */
  56. public $status;
  57. /** @var int */
  58. public $statusTimestamp;
  59. /** @var boolean */
  60. public $isUserDefined;
  61. /** @var string|null */
  62. public $messageId;
  63. /** @var string|null */
  64. public $customIcon;
  65. /** @var string|null */
  66. public $customMessage;
  67. /** @var int|null */
  68. public $clearAt;
  69. /** @var bool $isBackup */
  70. public $isBackup;
  71. public function __construct() {
  72. $this->addType('userId', 'string');
  73. $this->addType('status', 'string');
  74. $this->addType('statusTimestamp', 'int');
  75. $this->addType('isUserDefined', 'boolean');
  76. $this->addType('messageId', 'string');
  77. $this->addType('customIcon', 'string');
  78. $this->addType('customMessage', 'string');
  79. $this->addType('clearAt', 'int');
  80. $this->addType('isBackup', 'boolean');
  81. }
  82. }