From c2e10a12e6f431f79174b2a658cdd65c1af0ee0e Mon Sep 17 00:00:00 2001 From: Kendrick Chan Date: Sun, 23 Aug 2020 01:29:59 +0800 Subject: [PATCH] Make sure date_create has default for Notification entity #472 --- src/Entity/Notification.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Entity/Notification.php b/src/Entity/Notification.php index d024ac68..012bcb15 100644 --- a/src/Entity/Notification.php +++ b/src/Entity/Notification.php @@ -5,6 +5,8 @@ namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; +use DateTime; + /** * @ORM\Entity * @ORM\Table(name="notification", indexes={@ORM\Index(columns={"user_id"})}) @@ -63,6 +65,7 @@ class Notification public function __construct() { + $this->date_create = new DateTime(); $this->flag_read = false; $this->flag_fresh = true; }