-
Notifications
You must be signed in to change notification settings - Fork 118
Expand file tree
/
Copy pathSubmission.php
More file actions
57 lines (50 loc) · 1.2 KB
/
Submission.php
File metadata and controls
57 lines (50 loc) · 1.2 KB
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
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\Forms\Db;
use OCP\AppFramework\Db\Entity;
/**
* @method int getFormId()
* @method void setFormId(integer $value)
* @method string getUserId()
* @method void setUserId(string $value)
* @method int getTimestamp()
* @method void setTimestamp(integer $value)
* @method bool getIsVerified()
* @method void setIsVerified(bool $value)
*/
class Submission extends Entity {
protected $formId;
protected $userId;
protected $timestamp;
protected $isVerified;
/**
* Submission constructor.
*/
public function __construct() {
$this->addType('formId', 'integer');
$this->addType('timestamp', 'integer');
$this->addType('isVerified', 'boolean');
}
/**
* @return array{
* id: int,
* formId: int,
* userId: string,
* timestamp: int,
* isVerified: bool,
* }
*/
public function read(): array {
return [
'id' => $this->getId(),
'formId' => $this->getFormId(),
'userId' => $this->getUserId(),
'timestamp' => $this->getTimestamp(),
'isVerified' => (bool)$this->getIsVerified(),
];
}
}