|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <[email protected]> |
|
4
|
|
|
* |
|
5
|
|
|
* @author Vinzenz Rosenkranz <[email protected]> |
|
6
|
|
|
* @author Kai Schröer <[email protected]> |
|
7
|
|
|
* @author René Gieling <[email protected]> |
|
8
|
|
|
* |
|
9
|
|
|
* @license GNU AGPL version 3 or any later version |
|
10
|
|
|
* |
|
11
|
|
|
* This program is free software: you can redistribute it and/or modify |
|
12
|
|
|
* it under the terms of the GNU Affero General Public License as |
|
13
|
|
|
* published by the Free Software Foundation, either version 3 of the |
|
14
|
|
|
* License, or (at your option) any later version. |
|
15
|
|
|
* |
|
16
|
|
|
* This program is distributed in the hope that it will be useful, |
|
17
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
18
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
19
|
|
|
* GNU Affero General Public License for more details. |
|
20
|
|
|
* |
|
21
|
|
|
* You should have received a copy of the GNU Affero General Public License |
|
22
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
23
|
|
|
* |
|
24
|
|
|
*/ |
|
25
|
|
|
|
|
26
|
|
|
namespace OCA\Polls\Db; |
|
27
|
|
|
|
|
28
|
|
|
use JsonSerializable; |
|
29
|
|
|
|
|
30
|
|
|
use OCP\AppFramework\Db\Entity; |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @method integer getType() |
|
34
|
|
|
* @method void setType(integer $value) |
|
35
|
|
|
* @method string getTitle() |
|
36
|
|
|
* @method void setTitle(string $value) |
|
37
|
|
|
* @method string getDescription() |
|
38
|
|
|
* @method void setDescription(string $value) |
|
39
|
|
|
* @method string getOwner() |
|
40
|
|
|
* @method void setOwner(string $value) |
|
41
|
|
|
* @method string getCreated() |
|
42
|
|
|
* @method void setCreated(string $value) |
|
43
|
|
|
* @method string getAccess() |
|
44
|
|
|
* @method void setAccess(string $value) |
|
45
|
|
|
* @method string getExpire() |
|
46
|
|
|
* @method void setExpire(string $value) |
|
47
|
|
|
* @method integer getIsAnonymous() |
|
48
|
|
|
* @method void setIsAnonymous(integer $value) |
|
49
|
|
|
* @method integer getFullAnonymous() |
|
50
|
|
|
* @method void setFullAnonymous(integer $value) |
|
51
|
|
|
* @method integer getAllowMaybe() |
|
52
|
|
|
* @method void setAllowMaybe(integer $value) |
|
53
|
|
|
* @method integer getShowResults() |
|
54
|
|
|
* @method void setShowResults(integer $value) |
|
55
|
|
|
* @method integer getVoteLimit() |
|
56
|
|
|
* @method void setVoteLimit(integer $value) |
|
57
|
|
|
* @method integer getDeleted() |
|
58
|
|
|
* @method void setDeleted(integer $value) |
|
59
|
|
|
* @method integer getDeleteDate() |
|
60
|
|
|
* @method void setDeleteDate(integer $value) |
|
61
|
|
|
*/ |
|
62
|
|
|
class Event extends Entity implements JsonSerializable { |
|
63
|
|
|
protected $type; |
|
64
|
|
|
protected $title; |
|
65
|
|
|
protected $description; |
|
66
|
|
|
protected $owner; |
|
67
|
|
|
protected $created; |
|
68
|
|
|
protected $access; |
|
69
|
|
|
protected $hash; |
|
70
|
|
|
protected $expire; |
|
71
|
|
|
protected $isAnonymous; |
|
72
|
|
|
protected $fullAnonymous; |
|
73
|
|
|
protected $allowMaybe; |
|
74
|
|
|
protected $showResults; |
|
75
|
|
|
protected $voteLimit; |
|
76
|
|
|
protected $deleted; |
|
77
|
|
|
protected $deleteDate; |
|
78
|
|
|
|
|
79
|
|
|
public function jsonSerialize() { |
|
80
|
|
|
return [ |
|
81
|
|
|
'id' => $this->id, |
|
82
|
|
|
'type' => $this->type, |
|
83
|
|
|
'title' => $this->title, |
|
84
|
|
|
'description' => $this->description, |
|
85
|
|
|
'owner' => $this->owner, |
|
86
|
|
|
'created' => $this->created, |
|
87
|
|
|
'access' => $this->access, |
|
88
|
|
|
'expire' => $this->expire, |
|
89
|
|
|
'isAnonymous' => boolval($this->isAnonymous), |
|
90
|
|
|
'fullAnonymous' => boolval($this->fullAnonymous), |
|
91
|
|
|
'allowMaybe' => boolval($this->allowMaybe), |
|
92
|
|
|
'voteLimit' => $this->voteLimit, |
|
93
|
|
|
'showResults' => $this->showResults, |
|
94
|
|
|
'deleted' => boolval($this->deleted), |
|
95
|
|
|
'deleteDate' => $this->deleteDate |
|
96
|
|
|
]; |
|
97
|
|
|
} |
|
98
|
|
|
} |
|
99
|
|
|
|