]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Hash the urls to check if they exist
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index b3cfdc4a4c26dd13f979cb0782ba8a96592d453c..17a1ed58fa54c8585a2abbd970b331da1042cf24 100644 (file)
@@ -25,7 +25,8 @@ use Wallabag\UserBundle\Entity\User;
  *     options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"},
  *     indexes={
  *         @ORM\Index(name="created_at", columns={"created_at"}),
- *         @ORM\Index(name="uid", columns={"uid"})
+ *         @ORM\Index(name="uid", columns={"uid"}),
+ *         @ORM\Index(name="hashedurl", columns={"hashedurl"})
  *     }
  * )
  * @ORM\HasLifecycleCallbacks()
@@ -75,6 +76,13 @@ class Entry
      */
     private $url;
 
+    /**
+     * @var string
+     *
+     * @ORM\Column(name="hashedurl", type="text", nullable=true)
+     */
+    private $hashedUrl;
+
     /**
      * @var bool
      *
@@ -911,4 +919,24 @@ class Entry
     {
         return $this->originUrl;
     }
+
+    /**
+     * @return string
+     */
+    public function getHashedUrl()
+    {
+        return $this->hashedUrl;
+    }
+
+    /**
+     * @param mixed $hashedUrl
+     *
+     * @return Entry
+     */
+    public function setHashedUrl($hashedUrl)
+    {
+        $this->hashedUrl = $hashedUrl;
+
+        return $this;
+    }
 }