|
@@ -13,6 +13,7 @@ use Doctrine\Common\Collections\Collection;
|
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
use Doctrine\ORM\Mapping as ORM;
|
|
|
use JetBrains\PhpStorm\Pure;
|
|
use JetBrains\PhpStorm\Pure;
|
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
use Symfony\Component\Validator\Constraints as Assert;
|
|
|
|
|
+use App\Enum\Core\NotificationTypeEnum;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table Notification, et supprimer l'attribut discr.
|
|
* @todo : A la suite de la migration, il faut supprimer le nom de la table pour avoir une table Notification, et supprimer l'attribut discr.
|
|
@@ -56,17 +57,17 @@ class Notification
|
|
|
#[ORM\Column(length: 40, nullable: true)]
|
|
#[ORM\Column(length: 40, nullable: true)]
|
|
|
private ?string $name = null;
|
|
private ?string $name = null;
|
|
|
|
|
|
|
|
- #[ORM\Column(type: 'date', nullable: true)]
|
|
|
|
|
|
|
+ #[ORM\Column(type: 'datetime', nullable: true)]
|
|
|
private ?\DateTimeInterface $createDate;
|
|
private ?\DateTimeInterface $createDate;
|
|
|
|
|
|
|
|
- #[ORM\Column(type: 'date', nullable: true)]
|
|
|
|
|
|
|
+ #[ORM\Column(type: 'datetime', nullable: true)]
|
|
|
private ?\DateTimeInterface $updateDate;
|
|
private ?\DateTimeInterface $updateDate;
|
|
|
|
|
|
|
|
#[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
|
|
#[ORM\Column(type: 'json', length: 4294967295, nullable: true)]
|
|
|
private mixed $message = [];
|
|
private mixed $message = [];
|
|
|
|
|
|
|
|
#[ORM\Column(nullable: true)]
|
|
#[ORM\Column(nullable: true)]
|
|
|
- #[Assert\Choice(callback: ['\App\Enum\Core\NotificationTypeEnum', 'toArray'], message: 'invalid-type')]
|
|
|
|
|
|
|
+ #[Assert\Choice(callback: [NotificationTypeEnum::class, 'toArray'], message: 'invalid-type')]
|
|
|
private ?string $type = null;
|
|
private ?string $type = null;
|
|
|
|
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
#[ORM\Column(length: 255, nullable: true)]
|