<?php
namespace App\Entity\Contacts;
use App\Entity\Common\DatesTrait;
use App\Entity\Common\IdTrait;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\Contacts\NewslettersRepository")
*/
class Newsletters
{
use IdTrait;
use DatesTrait;
/**
* @var string
* @ORM\Column(type="string", length=100)
* @Assert\NotBlank(message="Veuillez saisir une adresse email")
* @Assert\Email(message="Veuillez saisir un email valide")
*/
private $email;
/**
* @var bool
* @ORM\Column(type="boolean", options={"default": 0})
*/
private $notification;
/**
* @return string|null
*/
public function getEmail(): ?string
{
return $this->email;
}
/**
* @param string $email
* @return $this
*/
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* @return bool|null
*/
public function getNotification(): ?bool
{
return $this->notification;
}
/**
* @param bool $notif
* @return $this
*/
public function setNotification(bool $notif): self
{
$this->notification = $notif;
return $this;
}
}