<?phpnamespace App\Entity\ReseauSociaux;use App\Entity\Company;use App\Entity\User;use App\Repository\ReseauSociaux\NotificationsRepository;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=NotificationsRepository::class) */class Notifications{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") * @Groups("notif:read") */ private $id; /** * @ORM\Column(type="boolean") * @Groups("notif:read") */ private $is_read; /** * @ORM\Column(type="boolean") * @Groups("notif:read") */ private $is_clicked; /** * @ORM\Column(type="boolean") */ private $isLast; /** * @ORM\Column(type="datetime_immutable") * @Groups("notif:read") */ private $created_At; /** * @ORM\ManyToOne(targetEntity=NotificationType::class, inversedBy="notifications") * @ORM\JoinColumn(nullable=false) * @Groups("notif:read") */ private $type; /** * @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifications") */ private $user; /** * @ORM\OneToOne(targetEntity=Comments::class, cascade={"persist", "remove"}) * @Groups("notif:read") */ private $comment; /** * @ORM\OneToOne(targetEntity=PostLike::class, cascade={"persist", "remove"}) * @Groups("notif:read") */ private $likepost; /** * @ORM\OneToOne(targetEntity=SharePost::class, cascade={"persist", "remove"}) * @Groups("notif:read") */ private $sharepost; /** * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="notificationsreseau") * @Groups("notif:read") */ private $company; public function getId(): ?int { return $this->id; } public function isIsRead(): ?bool { return $this->is_read; } public function setIsRead(bool $is_read): self { $this->is_read = $is_read; return $this; } public function isIsClicked(): ?bool { return $this->is_clicked; } public function setIsClicked(bool $is_clicked): self { $this->is_clicked = $is_clicked; return $this; } public function getCreatedAt(): ?\DateTimeImmutable { return $this->created_At; } public function setCreatedAt(\DateTimeImmutable $created_At): self { $this->created_At = $created_At; return $this; } public function getType(): ?NotificationType { return $this->type; } public function setType(?NotificationType $type): self { $this->type = $type; return $this; } public function getUser(): ?User { return $this->user; } public function setUser(?User $user): self { $this->user = $user; return $this; } public function getComment(): ?Comments { return $this->comment; } public function setComment(?Comments $comment): self { $this->comment = $comment; return $this; } public function getIsLast(): ?bool { return $this->isLast; } public function setIsLast(bool $isLast): self { $this->isLast = $isLast; return $this; } public function getLikepost(): ?PostLike { return $this->likepost; } public function setLikepost(?PostLike $likepost): self { $this->likepost = $likepost; return $this; } public function getSharepost(): ?SharePost { return $this->sharepost; } public function setSharepost(?SharePost $sharepost): self { $this->sharepost = $sharepost; return $this; } public function getCompany(): ?Company { return $this->company; } public function setCompany(?Company $company): self { $this->company = $company; return $this; }}