<?phpnamespace App\Entity\Core;use App\Entity\Core\Agencies;use App\Entity\Shop\Shop;use Doctrine\DBAL\Types\Types;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;use Symfony\Component\Validator\Constraints as Assert;use Doctrine\ORM\Mapping as ORM;/** * Notifications * * @ORM\Table("core_notifications") * @ORM\Entity(repositoryClass="App\Repository\Core\NotificationsRepository") * @ORM\HasLifecycleCallbacks() */class Notifications{ /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @var string * * @ORM\Column(name="created_at", type="datetime", nullable=true) */ private $createdAt; /** * @var string * * @ORM\Column(name="updated_at", type="datetime", nullable=true) */ private $updatedAt; /** * @var string * * @ORM\Column(name="title", type="text", nullable=true) */ private $title; /** * @var string * * @ORM\Column(name="description", type="text", nullable=true) */ private $description; /** * @var string * * @ORM\Column(name="type", type="text", nullable=true) */ private $type; /** * @var string * * @ORM\Column(name="only_admin", type="boolean", nullable=true) */ private $onlyAdmin; /** * @var \Users * * @ORM\ManyToOne(targetEntity="App\Entity\Core\Users") * @ORM\JoinColumns({ * @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=true) * }) */ protected $user; /** * @var string * * @ORM\Column(name="viewed", type="boolean", nullable=true) */ private $viewed; /** * @ORM\PrePersist */ public function setCreatedAtValue(): void { $this->setCreatedAt(new \DateTime("now")); $this->setUpdatedAt(new \DateTime("now")); } /** * @ORM\PreUpdate */ public function setUpdatedAtValue(): void { $this->setUpdatedAt(new \DateTime("now")); } public function __toString() { return $this->title; } public function getId(): ?int { return $this->id; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(?\DateTimeInterface $createdAt): static { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(?\DateTimeInterface $updatedAt): static { $this->updatedAt = $updatedAt; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(?string $title): static { $this->title = $title; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(?string $description): static { $this->description = $description; return $this; } public function getType(): ?string { return $this->type; } public function setType(?string $type): static { $this->type = $type; return $this; } public function isOnlyAdmin(): ?bool { return $this->onlyAdmin; } public function setOnlyAdmin(?bool $onlyAdmin): static { $this->onlyAdmin = $onlyAdmin; return $this; } public function getUser(): ?Users { return $this->user; } public function setUser(?Users $user): static { $this->user = $user; return $this; } public function isViewed(): ?bool { return $this->viewed; } public function setViewed(?bool $viewed): static { $this->viewed = $viewed; return $this; }}