src/Entity/Mail.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MailRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassMailRepository::class)]
  8. class Mail
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  15.     private ?\DateTimeInterface $created null;
  16.     #[ORM\ManyToOne(inversedBy'mails')]
  17.     #[ORM\JoinColumn(nullabletrue)]
  18.     private ?ClientOrder $clientOrder null;
  19.     #[ORM\Column]
  20.     private ?bool $sent null;
  21.     #[ORM\Column(length255nullabletrue)]
  22.     private ?string $mailerRef null;
  23.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  24.     private ?string $errorMessage null;
  25.     #[ORM\ManyToOne(inversedBy'mails')]
  26.     private ?Internaute $internaute null;
  27.     #[ORM\Column(length255nullabletrue)]
  28.     private ?string $type null;
  29.     public function __construct()
  30.     {
  31.         $this->created = new \DateTimeImmutable();
  32.     }
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getCreated(): ?\DateTimeInterface
  38.     {
  39.         return $this->created;
  40.     }
  41.     public function setCreated(\DateTimeInterface $created): static
  42.     {
  43.         $this->created $created;
  44.         return $this;
  45.     }
  46.     public function getClientOrder(): ?ClientOrder
  47.     {
  48.         return $this->clientOrder;
  49.     }
  50.     public function setClientOrder(?ClientOrder $clientOrder): static
  51.     {
  52.         $this->clientOrder $clientOrder;
  53.         return $this;
  54.     }
  55.     public function isSent(): ?bool
  56.     {
  57.         return $this->sent;
  58.     }
  59.     public function setSent(bool $sent): static
  60.     {
  61.         $this->sent $sent;
  62.         return $this;
  63.     }
  64.     public function getMailerRef(): ?string
  65.     {
  66.         return $this->mailerRef;
  67.     }
  68.     public function setMailerRef(?string $mailerRef): static
  69.     {
  70.         $this->mailerRef $mailerRef;
  71.         return $this;
  72.     }
  73.     public function getErrorMessage(): ?string
  74.     {
  75.         return $this->errorMessage;
  76.     }
  77.     public function setErrorMessage(?string $errorMessage): static
  78.     {
  79.         $this->errorMessage $errorMessage;
  80.         return $this;
  81.     }
  82.     public function getInternaute(): ?Internaute
  83.     {
  84.         return $this->internaute;
  85.     }
  86.     public function setInternaute(?Internaute $internaute): static
  87.     {
  88.         $this->internaute $internaute;
  89.         return $this;
  90.     }
  91.     public function getType(): ?string
  92.     {
  93.         return $this->type;
  94.     }
  95.     public function setType(?string $type): static
  96.     {
  97.         $this->type $type;
  98.         return $this;
  99.     }
  100.     // Backward compatibility method
  101.     public function getMailjetRef(): ?string
  102.     {
  103.         return $this->mailerRef;
  104.     }
  105.     public function setMailjetRef(?string $mailjetRef): static
  106.     {
  107.         $this->mailerRef $mailjetRef;
  108.         return $this;
  109.     }
  110. }