<?phpnamespace App\Entity;use App\Repository\MailRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: MailRepository::class)]class Mail{ #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] private ?int $id = null; #[ORM\Column(type: Types::DATETIME_MUTABLE)] private ?\DateTimeInterface $created = null; #[ORM\ManyToOne(inversedBy: 'mails')] #[ORM\JoinColumn(nullable: true)] private ?ClientOrder $clientOrder = null; #[ORM\Column] private ?bool $sent = null; #[ORM\Column(length: 255, nullable: true)] private ?string $mailerRef = null; #[ORM\Column(type: Types::TEXT, nullable: true)] private ?string $errorMessage = null; #[ORM\ManyToOne(inversedBy: 'mails')] private ?Internaute $internaute = null; #[ORM\Column(length: 255, nullable: true)] private ?string $type = null; public function __construct() { $this->created = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getCreated(): ?\DateTimeInterface { return $this->created; } public function setCreated(\DateTimeInterface $created): static { $this->created = $created; return $this; } public function getClientOrder(): ?ClientOrder { return $this->clientOrder; } public function setClientOrder(?ClientOrder $clientOrder): static { $this->clientOrder = $clientOrder; return $this; } public function isSent(): ?bool { return $this->sent; } public function setSent(bool $sent): static { $this->sent = $sent; return $this; } public function getMailerRef(): ?string { return $this->mailerRef; } public function setMailerRef(?string $mailerRef): static { $this->mailerRef = $mailerRef; return $this; } public function getErrorMessage(): ?string { return $this->errorMessage; } public function setErrorMessage(?string $errorMessage): static { $this->errorMessage = $errorMessage; return $this; } public function getInternaute(): ?Internaute { return $this->internaute; } public function setInternaute(?Internaute $internaute): static { $this->internaute = $internaute; return $this; } public function getType(): ?string { return $this->type; } public function setType(?string $type): static { $this->type = $type; return $this; } // Backward compatibility method public function getMailjetRef(): ?string { return $this->mailerRef; } public function setMailjetRef(?string $mailjetRef): static { $this->mailerRef = $mailjetRef; return $this; }}