src/Flexy/Apps/NewsletterBundle/Entity/NewsletterMailLog.php line 12

  1. <?php
  2. namespace App\Flexy\Apps\NewsletterBundle\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\Flexy\Apps\NewsletterBundle\Entity\NewsletterMailLogRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassNewsletterMailLogRepository::class)]
  8. #[ApiResource]
  9. class NewsletterMailLog
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255)]
  16.     private ?string $recipientEmail null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $status null;
  19.     #[ORM\Column(length255nullabletrue)]
  20.     private ?string $errorMessage null;
  21.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  22.     private ?\DateTimeInterface $createdAt null;
  23.     #[ORM\ManyToOne(inversedBy'newsletterMailLogs',cascade:["persist"])]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?NewsletterCompaignLaunch $newsletterCompaignLaunch null;
  26.     #[ORM\Column(nullabletrue)]
  27.     private ?bool $opened false;
  28.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  29.     private ?\DateTimeInterface $openedAt null;
  30.     public function __construct()
  31.     {
  32.         $this->createdAt = new \DateTime();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getRecipientEmail(): ?string
  39.     {
  40.         return $this->recipientEmail;
  41.     }
  42.     public function setRecipientEmail(string $recipientEmail): static
  43.     {
  44.         $this->recipientEmail $recipientEmail;
  45.         return $this;
  46.     }
  47.     public function getStatus(): ?string
  48.     {
  49.         return $this->status;
  50.     }
  51.     public function setStatus(string $status): static
  52.     {
  53.         $this->status $status;
  54.         return $this;
  55.     }
  56.     public function getErrorMessage(): ?string
  57.     {
  58.         return $this->errorMessage;
  59.     }
  60.     public function setErrorMessage(?string $errorMessage): static
  61.     {
  62.         $this->errorMessage $errorMessage;
  63.         return $this;
  64.     }
  65.     public function getCreatedAt(): ?\DateTimeInterface
  66.     {
  67.         return $this->createdAt;
  68.     }
  69.     public function setCreatedAt(?\DateTimeInterface $createdAt): static
  70.     {
  71.         $this->createdAt $createdAt;
  72.         return $this;
  73.     }
  74.     public function getNewsletterCompaignLaunch(): ?NewsletterCompaignLaunch
  75.     {
  76.         return $this->newsletterCompaignLaunch;
  77.     }
  78.     public function setNewsletterCompaignLaunch(?NewsletterCompaignLaunch $newsletterCompaignLaunch): static
  79.     {
  80.         $this->newsletterCompaignLaunch $newsletterCompaignLaunch;
  81.         return $this;
  82.     }
  83.     public function isOpened(): ?bool
  84.     {
  85.         return $this->opened;
  86.     }
  87.     public function setOpened(?bool $opened): static
  88.     {
  89.         $this->opened $opened;
  90.         return $this;
  91.     }
  92.     public function getOpenedAt(): ?\DateTimeInterface
  93.     {
  94.         return $this->openedAt;
  95.     }
  96.     public function setOpenedAt(?\DateTimeInterface $openedAt): static
  97.     {
  98.         $this->openedAt $openedAt;
  99.         return $this;
  100.     }
  101. }