X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FCoreBundle%2FEntity%2FEntry.php;h=7276b437cd01e8503507515003e15e1c5fcb04af;hb=f17b89fadce0a8c2280fbe1518d66f20dddce59d;hp=3cf9ac1a3b061f2928350119bba0be128e66c431;hpb=68003139e133835805b143b62c4407f19b495dab;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 3cf9ac1a..7276b437 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -22,7 +22,10 @@ use Wallabag\AnnotationBundle\Entity\Annotation; * @ORM\Table( * name="`entry`", * options={"collate"="utf8mb4_unicode_ci", "charset"="utf8mb4"}, - * indexes={@ORM\Index(name="created_at", columns={"created_at"})} + * indexes={ + * @ORM\Index(name="created_at", columns={"created_at"}), + * @ORM\Index(name="uid", columns={"uid"}) + * } * ) * @ORM\HasLifecycleCallbacks() * @Hateoas\Relation("self", href = "expr('/api/entries/' ~ object.getId())") @@ -44,11 +47,11 @@ class Entry /** * @var string * - * @ORM\Column(name="uuid", type="text", nullable=true) + * @ORM\Column(name="uid", type="string", length=23, nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ - private $uuid; + private $uid; /** * @var string @@ -183,7 +186,7 @@ class Entry /** * @var string * - * @ORM\Column(name="http_status", type="text", nullable=true) + * @ORM\Column(name="http_status", type="string", length=3, nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ @@ -649,34 +652,34 @@ class Entry /** * @return string */ - public function getUuid() + public function getUid() { - return $this->uuid; + return $this->uid; } /** - * @param string $uuid + * @param string $uid * * @return Entry */ - public function setUuid($uuid) + public function setUid($uid) { - $this->uuid = $uuid; + $this->uid = $uid; return $this; } - public function generateUuid() + public function generateUid() { - if (null === $this->uuid) { + if (null === $this->uid) { // @see http://blog.kevingomez.fr/til/2015/07/26/why-is-uniqid-slow/ for true parameter - $this->uuid = uniqid('', true); + $this->uid = uniqid('', true); } } - public function cleanUuid() + public function cleanUid() { - $this->uuid = null; + $this->uid = null; } /**