src/Entity/ReseauSociaux/Notifications.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\ReseauSociaux;
  3. use App\Entity\Company;
  4. use App\Entity\User;
  5. use App\Repository\ReseauSociaux\NotificationsRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. /**
  9.  * @ORM\Entity(repositoryClass=NotificationsRepository::class)
  10.  */
  11. class Notifications
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      * @Groups("notif:read")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="boolean")
  22.      * @Groups("notif:read")
  23.      */
  24.     private $is_read;
  25.     /**
  26.      * @ORM\Column(type="boolean")
  27.      * @Groups("notif:read")
  28.      */
  29.     private $is_clicked;
  30.     /**
  31.      * @ORM\Column(type="boolean")
  32.      */
  33.     private $isLast;
  34.     /**
  35.      * @ORM\Column(type="datetime_immutable")
  36.      * @Groups("notif:read")
  37.      */
  38.     private $created_At;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=NotificationType::class, inversedBy="notifications")
  41.      * @ORM\JoinColumn(nullable=false)
  42.      * @Groups("notif:read")
  43.      */
  44.     private $type;
  45.     /**
  46.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="notifications")
  47.      */
  48.     private $user;
  49.     /**
  50.      * @ORM\OneToOne(targetEntity=Comments::class, cascade={"persist", "remove"})
  51.      * @Groups("notif:read")
  52.      */
  53.     private $comment;
  54.     /**
  55.      * @ORM\OneToOne(targetEntity=PostLike::class, cascade={"persist", "remove"})
  56.      * @Groups("notif:read")
  57.      */
  58.     private $likepost;
  59.     /**
  60.      * @ORM\OneToOne(targetEntity=SharePost::class, cascade={"persist", "remove"})
  61.      * @Groups("notif:read")
  62.      */
  63.     private $sharepost;
  64.     /**
  65.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="notificationsreseau")
  66.      * @Groups("notif:read")
  67.      */
  68.     private $company;
  69.     public function getId(): ?int
  70.     {
  71.         return $this->id;
  72.     }
  73.     public function isIsRead(): ?bool
  74.     {
  75.         return $this->is_read;
  76.     }
  77.     public function setIsRead(bool $is_read): self
  78.     {
  79.         $this->is_read $is_read;
  80.         return $this;
  81.     }
  82.     public function isIsClicked(): ?bool
  83.     {
  84.         return $this->is_clicked;
  85.     }
  86.     public function setIsClicked(bool $is_clicked): self
  87.     {
  88.         $this->is_clicked $is_clicked;
  89.         return $this;
  90.     }
  91.     public function getCreatedAt(): ?\DateTimeImmutable
  92.     {
  93.         return $this->created_At;
  94.     }
  95.     public function setCreatedAt(\DateTimeImmutable $created_At): self
  96.     {
  97.         $this->created_At $created_At;
  98.         return $this;
  99.     }
  100.     public function getType(): ?NotificationType
  101.     {
  102.         return $this->type;
  103.     }
  104.     public function setType(?NotificationType $type): self
  105.     {
  106.         $this->type $type;
  107.         return $this;
  108.     }
  109.     public function getUser(): ?User
  110.     {
  111.         return $this->user;
  112.     }
  113.     public function setUser(?User $user): self
  114.     {
  115.         $this->user $user;
  116.         return $this;
  117.     }
  118.     public function getComment(): ?Comments
  119.     {
  120.         return $this->comment;
  121.     }
  122.     public function setComment(?Comments $comment): self
  123.     {
  124.         $this->comment $comment;
  125.         return $this;
  126.     }
  127.     public function getIsLast(): ?bool
  128.     {
  129.         return $this->isLast;
  130.     }
  131.     public function setIsLast(bool $isLast): self
  132.     {
  133.         $this->isLast $isLast;
  134.         return $this;
  135.     }
  136.     public function getLikepost(): ?PostLike
  137.     {
  138.         return $this->likepost;
  139.     }
  140.     public function setLikepost(?PostLike $likepost): self
  141.     {
  142.         $this->likepost $likepost;
  143.         return $this;
  144.     }
  145.     public function getSharepost(): ?SharePost
  146.     {
  147.         return $this->sharepost;
  148.     }
  149.     public function setSharepost(?SharePost $sharepost): self
  150.     {
  151.         $this->sharepost $sharepost;
  152.         return $this;
  153.     }
  154.     public function getCompany(): ?Company
  155.     {
  156.         return $this->company;
  157.     }
  158.     public function setCompany(?Company $company): self
  159.     {
  160.         $this->company $company;
  161.         return $this;
  162.     }
  163. }