Make sure date_create has default for Notification entity #472
This commit is contained in:
parent
678dfcc65d
commit
c2e10a12e6
1 changed files with 3 additions and 0 deletions
|
|
@ -5,6 +5,8 @@ namespace App\Entity;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
|
|
||||||
|
use DateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity
|
* @ORM\Entity
|
||||||
* @ORM\Table(name="notification", indexes={@ORM\Index(columns={"user_id"})})
|
* @ORM\Table(name="notification", indexes={@ORM\Index(columns={"user_id"})})
|
||||||
|
|
@ -63,6 +65,7 @@ class Notification
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
|
$this->date_create = new DateTime();
|
||||||
$this->flag_read = false;
|
$this->flag_read = false;
|
||||||
$this->flag_fresh = true;
|
$this->flag_fresh = true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue