src/Entity/EmailRequest.php line 13
<?phpnamespace App\Entity;use App\Repository\EmailRequestRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\HttpFoundation\File\File;use Vich\UploaderBundle\Mapping\Annotation as Vich;#[ORM\Entity(repositoryClass: EmailRequestRepository::class)]#[Vich\Uploadable]class EmailRequest{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $CreatedAt = null;#[ORM\ManyToOne]private ?user $CreatedBy = null;#[ORM\Column(length: 255, nullable: true)]private ?string $Subject = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $EmailBody = null;#[ORM\Column(length: 255, nullable: true)]private ?string $Distination = null;#[ORM\Column(nullable: true)]private ?int $Status = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $ErrorMessage = null;#[ORM\Column(length: 100, nullable: true)]private ?string $RequestRoute = null;// NOTE: This is not a mapped field of entity metadata, just a simple property.#[Vich\UploadableField(mapping: 'file_attachement', fileNameProperty: 'fileName', size: 'fileSize')]private ?File $AttachementFile = null;#[ORM\Column(nullable: true)]private ?string $fileName = null;#[ORM\Column(nullable: true)]private ?int $fileSize = null;public function getId(): ?int{return $this->id;}public function getCreatedAt(): ?\DateTimeInterface{return $this->CreatedAt;}public function setCreatedAt(?\DateTimeInterface $CreatedAt): self{$this->CreatedAt = $CreatedAt;return $this;}public function getCreatedBy(): ?user{return $this->CreatedBy;}public function setCreatedBy(?user $CreatedBy): self{$this->CreatedBy = $CreatedBy;return $this;}public function getSubject(): ?string{return $this->Subject;}public function setSubject(?string $Subject): self{$this->Subject = $Subject;return $this;}public function getEmailBody(): ?string{return $this->EmailBody;}public function setEmailBody(?string $EmailBody): self{$this->EmailBody = $EmailBody;return $this;}public function getDistination(): ?string{return $this->Distination;}public function setDistination(?string $Distination): self{$this->Distination = $Distination;return $this;}public function getStatus(): ?int{return $this->Status;}public function setStatus(?int $Status): self{$this->Status = $Status;return $this;}public function getErrorMessage(): ?string{return $this->ErrorMessage;}public function setErrorMessage(?string $ErrorMessage): self{$this->ErrorMessage = $ErrorMessage;return $this;}public function getRequestRoute(): ?string{return $this->RequestRoute;}public function setRequestRoute(?string $RequestRoute): self{$this->RequestRoute = $RequestRoute;return $this;}/*** If manually uploading a file (i.e. not using Symfony Form) ensure an instance* of 'UploadedFile' is injected into this setter to trigger the update. If this* bundle's configuration parameter 'inject_on_load' is set to 'true' this setter* must be able to accept an instance of 'File' as the bundle will inject one here* during Doctrine hydration.** @param File|\Symfony\Component\HttpFoundation\File\UploadedFile|null $AttachementFile*/public function setAttachementFile(?File $AttachementFile = null): void{$this->AttachementFile = $AttachementFile;if (null !== $AttachementFile) {// It is required that at least one field changes if you are using doctrine// otherwise the event listeners won't be called and the file is lost$this->updatedAt = new \DateTimeImmutable();}}public function getAttachementFile(): ?File{return $this->AttachementFile;}public function setFileName(?string $fileName): void{$this->fileName = $fileName;}public function getFileName(): ?string{return $this->fileName;}public function setFileSize(?int $fileSize): void{$this->fileSize = $fileSize;}public function getFileSize(): ?int{return $this->fileSize;}}