From 10b3509757c704943aa9cdd69c1d02bedfa937a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 18 Nov 2016 15:09:21 +0100 Subject: Added http_status in Entry entity --- src/Wallabag/CoreBundle/Entity/Entry.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index f59c445f..31e594bf 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -180,6 +180,15 @@ class Entry */ private $isPublic; + /** + * @var int + * + * @ORM\Column(name="http_status", type="integer", nullable=true) + * + * @Groups({"entries_for_user", "export_all"}) + */ + private $httpStatus; + /** * @Exclude * @@ -669,4 +678,24 @@ class Entry { $this->uuid = null; } + + /** + * @return int + */ + public function getHttpStatus() + { + return $this->httpStatus; + } + + /** + * @param int $httpStatus + * + * @return Entry + */ + public function setHttpStatus($httpStatus) + { + $this->httpStatus = $httpStatus; + + return $this; + } } -- cgit v1.2.3 From e10e6ab34e62129d57fc69d7b9b69b08c20e6f5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Fri, 18 Nov 2016 15:55:16 +0100 Subject: Replace http status with a string I don't want to have 0 if we don't fetch status code, I think it's better to have an empty string, mainly for filters --- src/Wallabag/CoreBundle/Entity/Entry.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Wallabag/CoreBundle/Entity/Entry.php') diff --git a/src/Wallabag/CoreBundle/Entity/Entry.php b/src/Wallabag/CoreBundle/Entity/Entry.php index 31e594bf..3cf9ac1a 100644 --- a/src/Wallabag/CoreBundle/Entity/Entry.php +++ b/src/Wallabag/CoreBundle/Entity/Entry.php @@ -181,9 +181,9 @@ class Entry private $isPublic; /** - * @var int + * @var string * - * @ORM\Column(name="http_status", type="integer", nullable=true) + * @ORM\Column(name="http_status", type="text", nullable=true) * * @Groups({"entries_for_user", "export_all"}) */ -- cgit v1.2.3