aboutsummaryrefslogtreecommitdiffstats
path: root/apps/cloud_federation_api/lib/Db/FederatedInvite.php
blob: b2447ff4e23cea51fd76dec94c409abded7b3a13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace OCA\CloudFederationAPI\Db;

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

/**
 * @method bool isAccepted()
 * @method void setAccepted(bool $accepted)
 * @method int|null getAcceptedAt()
 * @method void setAcceptedAt(int $acceptedAt)
 * @method int|null getCreatedAt()
 * @method void setCreatedAt(int $createdAt)
 * @method int|null getExpiredAt()
 * @method void setExpiredAt(int $expiredAt)
 * @method string|null getRecipientEmail()
 * @method void setRecipientEmail(string $recipientEmail)
 * @method string|null getRecipientName()
 * @method void setRecipientName(string $recipientName)
 * @method string|null getRecipientProvider()
 * @method void setRecipientProvider(string $recipientProvider)
 * @method string|null getRecipientUserId()
 * @method void setRecipientUserId(string $recipientUserId)
 * @method string getToken()
 * @method void setToken(string $token)
 * @method string|null getUserId()
 * @method void setUserId(string $userId)
 */

class FederatedInvite extends Entity {
	protected bool $accepted = false;
	protected ?int $acceptedAt = 0;
	protected int $createdAt = 0;
	protected ?int $expiredAt = 0;
	protected ?string $recipientEmail = null;
	protected ?string $recipientName = null;
	protected ?string $recipientProvider = null;
	protected ?string $recipientUserId = null;
	protected string $token = '';
	protected string $userId = '';

	public function __construct() {
		$this->addType('accepted', Types::BOOLEAN);
		$this->addType('acceptedAt', Types::BIGINT);
		$this->addType('createdAt', Types::BIGINT);
		$this->addType('expiredAt', Types::BIGINT);
		$this->addType('recipientEmail', Types::STRING);
		$this->addType('recipientName', Types::STRING);
		$this->addType('recipientProvider', Types::STRING);
		$this->addType('recipientUserId', Types::STRING);
		$this->addType('token', Types::STRING);
		$this->addType('userId', Types::STRING);
	}
}