HEX
Server: LiteSpeed
System: Linux d8 4.18.0-553.121.1.lve.el8.x86_64 #1 SMP Thu Apr 30 16:40:41 UTC 2026 x86_64
User: wbwebdes (3015)
PHP: 8.1.31
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/wbwebdes/domains/files.wb-cloud.nl/private_html/apps/notifications/lib/Model/Settings.php
<?php

declare(strict_types=1);
/**
 * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace OCA\Notifications\Model;

use OCP\AppFramework\Db\Entity;
use OCP\DB\Types;

/**
 *
 * @method void setUserId(string $userId)
 * @method string getUserId()
 * @method void setBatchTime(int $batchTime)
 * @method int getBatchTime()
 * @method void setLastSendId(int $lastSendId)
 * @method int getLastSendId()
 * @method void setNextSendTime(int $nextSendTime)
 * @method int getNextSendTime()
 */
class Settings extends Entity {
	public const EMAIL_SEND_DEFAULT = 5;
	public const EMAIL_SEND_WEEKLY = 4;
	public const EMAIL_SEND_DAILY = 3;
	public const EMAIL_SEND_3HOURLY = 2;
	public const EMAIL_SEND_HOURLY = 1;
	public const EMAIL_SEND_OFF = 0;

	/** @var string */
	protected $userId;
	/** @var int */
	protected $batchTime;
	/** @var int */
	protected $lastSendId;
	/** @var int */
	protected $nextSendTime;

	public function __construct() {
		$this->addType('userId', Types::STRING);
		$this->addType('batchTime', Types::INTEGER);
		$this->addType('lastSendId', Types::BIGINT);
		$this->addType('nextSendTime', Types::INTEGER);
	}

	public function asArray(): array {
		return [
			'id' => $this->getId(),
			'user_id' => $this->getUserId(),
			'batch_time' => $this->getBatchTime(),
			'last_send_id' => $this->getLastSendId(),
			'next_send_time' => $this->getNextSendTime(),
		];
	}
}