src/Entity/NewsletterEmail.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\NewsletterEmailRepository;
  4. use DateTime;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassNewsletterEmailRepository::class)]
  7. class NewsletterEmail
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255nullabletrue)]
  14.     private $email;
  15.     #[ORM\Column(type'boolean'nullabletrue)]
  16.     private $isActive=1;
  17.     #[ORM\Column(type'datetime'nullabletrue)]
  18.     private $created;
  19.     public function __construct()
  20.     {
  21.         $this->created = new DateTime();
  22.     }
  23.     public function getId(): ?int
  24.     {
  25.         return $this->id;
  26.     }
  27.     public function getEmail(): ?string
  28.     {
  29.         return $this->email;
  30.     }
  31.     public function setEmail(?string $email): self
  32.     {
  33.         $this->email $email;
  34.         return $this;
  35.     }
  36.     public function getIsActive(): ?bool
  37.     {
  38.         return $this->isActive;
  39.     }
  40.     public function setIsActive(?bool $isActive): self
  41.     {
  42.         $this->isActive $isActive;
  43.         return $this;
  44.     }
  45.     public function getCreated(): ?\DateTimeInterface
  46.     {
  47.         return $this->created;
  48.     }
  49.     public function setCreated(?\DateTimeInterface $created): self
  50.     {
  51.         $this->created $created;
  52.         return $this;
  53.     }
  54. }