Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db/Event.php')
-rw-r--r--lib/Db/Event.php42
1 files changed, 25 insertions, 17 deletions
diff --git a/lib/Db/Event.php b/lib/Db/Event.php
index df4c1ca8..8a167495 100644
--- a/lib/Db/Event.php
+++ b/lib/Db/Event.php
@@ -3,6 +3,7 @@
* @copyright Copyright (c) 2017 Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
*
* @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
+ * @author Kai Schröer <git@schroeer.co>
*
* @license GNU AGPL version 3 or any later version
*
@@ -23,8 +24,6 @@
namespace OCA\Polls\Db;
-use OCP\AppFramework\Db\Entity;
-
/**
* @method integer getType()
* @method void setType(integer $value)
@@ -34,12 +33,12 @@ use OCP\AppFramework\Db\Entity;
* @method void setDescription(string $value)
* @method string getOwner()
* @method void setOwner(string $value)
- * @method timestamp getCreated()
- * @method void setCreated(timestamp $value)
+ * @method string getCreated()
+ * @method void setCreated(string $value)
* @method string getAccess()
* @method void setAccess(string $value)
- * @method timestamp getExpire()
- * @method void setExpire(timestamp $value)
+ * @method string getExpire()
+ * @method void setExpire(string $value)
* @method string getHash()
* @method void setHash(string $value)
* @method integer getIsAnonymous()
@@ -47,15 +46,24 @@ use OCP\AppFramework\Db\Entity;
* @method integer getFullAnonymous()
* @method void setFullAnonymous(integer $value)
*/
-class Event extends Entity {
- public $type;
- public $title;
- public $description;
- public $owner;
- public $created;
- public $access;
- public $expire;
- public $hash;
- public $isAnonymous;
- public $fullAnonymous;
+class Event extends Model {
+ protected $type;
+ protected $title;
+ protected $description;
+ protected $owner;
+ protected $created;
+ protected $access;
+ protected $expire;
+ protected $hash;
+ protected $isAnonymous;
+ protected $fullAnonymous;
+
+ /**
+ * Event constructor.
+ */
+ public function __construct() {
+ $this->addType('type', 'integer');
+ $this->addType('isAnonymous', 'integer');
+ $this->addType('fullAnonymous', 'integer');
+ }
}