src/Entity/NewsLetterSubscriber.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\NewsLetterSubscriberRepository")
  6.  */
  7. class NewsLetterSubscriber
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=100, unique=true)
  17.      */
  18.     private $email;
  19.     /**
  20.      * @ORM\Column(type="datetime")
  21.      */
  22.     private $dateCreated;
  23.     /**
  24.      * @ORM\Column(type="boolean")
  25.      */
  26.     private $active=false;
  27.     public function __construct(){
  28.         $this->dateCreated = new \DateTime();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getEmail(): ?string
  35.     {
  36.         return $this->email;
  37.     }
  38.     public function setEmail(string $email): self
  39.     {
  40.         $this->email $email;
  41.         return $this;
  42.     }
  43.     public function getDateCreated(): ?\DateTimeInterface
  44.     {
  45.         return $this->dateCreated;
  46.     }
  47.     public function setDateCreated(\DateTimeInterface $dateCreated): self
  48.     {
  49.         $this->dateCreated $dateCreated;
  50.         return $this;
  51.     }
  52.     public function getActive(): ?bool
  53.     {
  54.         return $this->active;
  55.     }
  56.     public function setActive(bool $active): self
  57.     {
  58.         $this->active $active;
  59.         return $this;
  60.     }
  61. }