update schema to send to emails

This commit is contained in:
2022-04-13 18:02:11 +02:00
parent e6169ddffa
commit ef9fd80ad5
2 changed files with 52 additions and 0 deletions

View File

@@ -105,12 +105,25 @@ class Notification implements TrackUpdateInterface
*/
private ?User $updatedBy;
/**
* a list of destinee which will receive notifications
* @var array|string[]
* @ORM\Column(type="json")
*/
public array $adressesEmails = [];
/**
* @ORM\Column(type="text", nullable=false)
*/
private string $accessKey;
public function __construct()
{
$this->addressees = new ArrayCollection();
$this->unreadBy = new ArrayCollection();
$this->comments = new ArrayCollection();
$this->setDate(new DateTimeImmutable());
$this->accessKey = bin2hex(openssl_random_pseudo_bytes(24));
}
public function addAddressee(User $addressee): self