<?phpnamespace App\Entity;use Doctrine\ORM\Mapping as ORM;use App\Repository\NotificationRepository;use Symfony\Component\PropertyAccess\PropertyAccess;use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;use Symfony\Component\Validator\Constraints as Assert;#[ORM\Entity(repositoryClass: NotificationRepository::class)]class Notification implements TranslatableInterface{ use TranslatableTrait; #[ORM\Id] #[ORM\GeneratedValue] #[ORM\Column(type: 'integer')] private $id; #[Assert\Valid] protected $translations; #[ORM\Column(type: 'text', nullable: true)] private $link; #[ORM\ManyToOne(targetEntity: User::class, inversedBy: 'notifications')] #[ORM\JoinColumn(nullable: false)] private $user; #[ORM\Column(type: 'boolean', options: ['default' => 0])] private $isOpen; #[ORM\Column(type: 'integer')] private $type; #[ORM\Column(type: 'smallint')] private $status; #[ORM\Column(type: 'datetime_immutable')] private $createdAt; #[ORM\Column(type: 'datetime_immutable')] private $updatedAt; public function __construct() { $this->isOpen = false; } public function getId(): ?int { return $this->id; } public function getType(): ?int { return $this->type; } public function setType(int $type): self { $this->type = $type; return $this; } public function getLink(): ?string { return $this->link; } public function setLink(?string $link): self { $this->link = $link; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getIsOpen(): ?bool { return $this->isOpen; } public function setIsOpen(bool $isOpen): self { $this->isOpen = $isOpen; return $this; } public function __call($method, $arguments) { return PropertyAccess::createPropertyAccessor()->getValue($this->translate(), $method); } public function __get($name) { $method = ucfirst($name); return $this->proxyCurrentLocaleTranslation($method, []); } public function __toString() { return 'test'; } public function getStatus(): ?int { return $this->status; } public function setStatus(int $status): self { $this->status = $status; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->createdAt; } public function setCreatedAt(\DateTimeImmutable $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeImmutable { return $this->updatedAt; } public function setUpdatedAt(\DateTimeImmutable $updatedAt): self { $this->updatedAt = $updatedAt; return $this; }}