From 12d4051da647a096d1e08957a53d505d24a6a452 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 28 Oct 2024 15:55:34 +0100 Subject: [PATCH] fix(entity): Use db types Signed-off-by: Joas Schilling --- lib/Db/Token.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Db/Token.php b/lib/Db/Token.php index c5cfc914..8a9f4f57 100644 --- a/lib/Db/Token.php +++ b/lib/Db/Token.php @@ -9,6 +9,7 @@ namespace OCA\TwoFactorNextcloudNotification\Db; use OCP\AppFramework\Db\Entity; +use OCP\DB\Types; /** * @method string getUserId() @@ -35,9 +36,9 @@ class Token extends Entity { protected $timestamp; public function __construct() { - $this->addType('userId', 'string'); - $this->addType('token', 'string'); - $this->addType('status', 'int'); - $this->addType('timestamp', 'int'); + $this->addType('userId', Types::STRING); + $this->addType('token', Types::STRING); + $this->addType('status', Types::INTEGER); + $this->addType('timestamp', Types::INTEGER); } }