]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Merge pull request #3024 from wallabag/store-date
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 7276b437cd01e8503507515003e15e1c5fcb04af..b71c467cf6ba3942812e670510cccbe00fd14b6f 100644 (file)
@@ -121,6 +121,24 @@ class Entry
      */
     private $updatedAt;
 
+    /**
+     * @var \DateTime
+     *
+     * @ORM\Column(name="published_at", type="datetime", nullable=true)
+     *
+     * @Groups({"entries_for_user", "export_all"})
+     */
+    private $publishedAt;
+
+    /**
+     * @var array
+     *
+     * @ORM\Column(name="published_by", type="json_array", nullable=true)
+     *
+     * @Groups({"entries_for_user", "export_all"})
+     */
+    private $publishedBy;
+
     /**
      * @ORM\OneToMany(targetEntity="Wallabag\AnnotationBundle\Entity\Annotation", mappedBy="entry", cascade={"persist", "remove"})
      * @ORM\JoinTable
@@ -174,15 +192,6 @@ class Entry
      */
     private $previewPicture;
 
-    /**
-     * @var bool
-     *
-     * @ORM\Column(name="is_public", type="boolean", nullable=true, options={"default" = false})
-     *
-     * @Groups({"export_all"})
-     */
-    private $isPublic;
-
     /**
      * @var string
      *
@@ -531,22 +540,6 @@ class Entry
         $this->domainName = $domainName;
     }
 
-    /**
-     * @return bool
-     */
-    public function isPublic()
-    {
-        return $this->isPublic;
-    }
-
-    /**
-     * @param bool $isPublic
-     */
-    public function setIsPublic($isPublic)
-    {
-        $this->isPublic = $isPublic;
-    }
-
     /**
      * @return ArrayCollection<Tag>
      */
@@ -701,4 +694,44 @@ class Entry
 
         return $this;
     }
+
+    /**
+     * @return \Datetime
+     */
+    public function getPublishedAt()
+    {
+        return $this->publishedAt;
+    }
+
+    /**
+     * @param \Datetime $publishedAt
+     *
+     * @return Entry
+     */
+    public function setPublishedAt(\Datetime $publishedAt)
+    {
+        $this->publishedAt = $publishedAt;
+
+        return $this;
+    }
+
+    /**
+     * @return string
+     */
+    public function getPublishedBy()
+    {
+        return $this->publishedBy;
+    }
+
+    /**
+     * @param string $publishedBy
+     *
+     * @return Entry
+     */
+    public function setPublishedBy($publishedBy)
+    {
+        $this->publishedBy = $publishedBy;
+
+        return $this;
+    }
 }