← Back
Editing: ReportMail.php
<?php namespace App\Entity; use App\Report\Mail\Enum\MailTemplateType; use App\Repository\ReportMailRepository; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Serializer\Annotation\Groups; #[ORM\Entity(repositoryClass: ReportMailRepository::class)] class ReportMail { #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column] #[Groups(['show_report_mail'])] private ?int $id = null; #[ORM\ManyToOne(inversedBy: 'reportMails')] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private ?Report $report = null; #[ORM\Column(type: Types::TEXT)] #[Groups(['show_report_mail'])] private ?string $body = null; #[ORM\Column(type: Types::BOOLEAN)] #[Groups(['show_report_mail'])] private ?bool $isPrinted = false; #[ORM\Column] #[Groups(['show_report_mail'])] private ?\DateTimeImmutable $createdAt; #[ORM\Column(length: 50, enumType: MailTemplateType::class)] #[Groups(['show_report_mail'])] private ?MailTemplateType $mailType = null; public function __construct() { $this->createdAt = new \DateTimeImmutable(); } public function getId(): ?int { return $this->id; } public function getReport(): ?Report { return $this->report; } public function setReport(?Report $report): static { $this->report = $report; return $this; } public function getBody(): ?string { return $this->body; } public function setBody(string $body): static { $this->body = $body; return $this; } public function getIsPrinted(): ?bool { return $this->isPrinted; } public function setIsPrinted(bool $isPrinted): static { $this->isPrinted = $isPrinted; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getMailType(): ?MailTemplateType { return $this->mailType; } public function setMailType(MailTemplateType $mailType): static { $this->mailType = $mailType; return $this; } }
Save File
Cancel