<?phpnamespace App\Entity;use App\Repository\ItemsListBackupRepository;use DateTime;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: ItemsListBackupRepository::class)]#[ORM\Table(name: 'items_list_backup')]class ItemsListBackup { #[ORM\Column(type: 'boolean')] private bool $isDeleted = false; #[ORM\Column(name: 'createdAt', type: 'datetime')] private DateTime $createdAt; #[ORM\Id] #[ORM\Column(name: 'id', type: 'integer')] #[ORM\GeneratedValue(strategy: 'AUTO')] private ?int $id; #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'itemsListBackups')] #[ORM\JoinColumn(nullable: false)] private User $user; #[ORM\Column(type: 'string', length: 255, nullable: true)] private ?string $pdfFileName; public function __construct() { $this->createdAt = new DateTime(); } public function __toString() { return "#" . $this->id . " - " . $this->pdfFileName; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set createdAt * * @param DateTime $createdAt * * @return ItemsListBackup */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set pdfFileName * * @param string $pdfFileName * * @return ItemsListBackup */ public function setPdfFileName($pdfFileName) { $this->pdfFileName = $pdfFileName; return $this; } /** * Get pdfFileName * * @return string */ public function getPdfFileName() { return $this->pdfFileName; } public function getPdfFileNameWithExtention(): string { return $this->pdfFileName . '.pdf'; } /** * Set user * * @param \App\Entity\User $user * * @return ItemsListBackup */ public function setUser(\App\Entity\User $user) { $this->user = $user; return $this; } /** * Get user * * @return \App\Entity\User */ public function getUser() { return $this->user; } /** * Set isDeleted * * @param boolean $isDeleted * * @return ItemsListBackup */ public function setIsDeleted($isDeleted) { $this->isDeleted = $isDeleted; return $this; } /** * Get isDeleted * * @return boolean */ public function getIsDeleted() { return $this->isDeleted; }}