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.      * @Groups("notif:read")
  48.      */
  49.     private $user;
  50.     /**
  51.      * @ORM\OneToOne(targetEntity=Comments::class, cascade={"persist", "remove"})
  52.      * @Groups("notif:read")
  53.      */
  54.     private $comment;
  55.     /**
  56.      * @ORM\OneToOne(targetEntity=PostLike::class, cascade={"persist", "remove"})
  57.      * @Groups("notif:read")
  58.      */
  59.     private $likepost;
  60.     /**
  61.      * @ORM\OneToOne(targetEntity=SharePost::class, cascade={"persist", "remove"})
  62.      * @Groups("notif:read")
  63.      */
  64.     private $sharepost;
  65.     /**
  66.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="notificationsreseau")
  67.      * @Groups("notif:read")
  68.      */
  69.     private $company;
  70.     /**
  71.      * @ORM\OneToOne(targetEntity=InvitationEspace::class, inversedBy="notifications", cascade={"persist", "remove"})
  72.      * @Groups("notif:read")
  73.      */
  74.     private $invitationEspace;
  75.     public function getId(): ?int
  76.     {
  77.         return $this->id;
  78.     }
  79.     public function isIsRead(): ?bool
  80.     {
  81.         return $this->is_read;
  82.     }
  83.     public function setIsRead(bool $is_read): self
  84.     {
  85.         $this->is_read $is_read;
  86.         return $this;
  87.     }
  88.     public function isIsClicked(): ?bool
  89.     {
  90.         return $this->is_clicked;
  91.     }
  92.     public function setIsClicked(bool $is_clicked): self
  93.     {
  94.         $this->is_clicked $is_clicked;
  95.         return $this;
  96.     }
  97.     public function getCreatedAt(): ?\DateTimeImmutable
  98.     {
  99.         return $this->created_At;
  100.     }
  101.     public function setCreatedAt(\DateTimeImmutable $created_At): self
  102.     {
  103.         $this->created_At $created_At;
  104.         return $this;
  105.     }
  106.     public function getType(): ?NotificationType
  107.     {
  108.         return $this->type;
  109.     }
  110.     public function setType(?NotificationType $type): self
  111.     {
  112.         $this->type $type;
  113.         return $this;
  114.     }
  115.     public function getUser(): ?User
  116.     {
  117.         return $this->user;
  118.     }
  119.     public function setUser(?User $user): self
  120.     {
  121.         $this->user $user;
  122.         return $this;
  123.     }
  124.     public function getComment(): ?Comments
  125.     {
  126.         return $this->comment;
  127.     }
  128.     public function setComment(?Comments $comment): self
  129.     {
  130.         $this->comment $comment;
  131.         return $this;
  132.     }
  133.     public function getIsLast(): ?bool
  134.     {
  135.         return $this->isLast;
  136.     }
  137.     public function setIsLast(bool $isLast): self
  138.     {
  139.         $this->isLast $isLast;
  140.         return $this;
  141.     }
  142.     public function getLikepost(): ?PostLike
  143.     {
  144.         return $this->likepost;
  145.     }
  146.     public function setLikepost(?PostLike $likepost): self
  147.     {
  148.         $this->likepost $likepost;
  149.         return $this;
  150.     }
  151.     public function getSharepost(): ?SharePost
  152.     {
  153.         return $this->sharepost;
  154.     }
  155.     public function setSharepost(?SharePost $sharepost): self
  156.     {
  157.         $this->sharepost $sharepost;
  158.         return $this;
  159.     }
  160.     public function getCompany(): ?Company
  161.     {
  162.         return $this->company;
  163.     }
  164.     public function setCompany(?Company $company): self
  165.     {
  166.         $this->company $company;
  167.         return $this;
  168.     }
  169.     public function getInvitationEspace(): ?InvitationEspace
  170.     {
  171.         return $this->invitationEspace;
  172.     }
  173.     public function setInvitationEspace(?InvitationEspace $invitationEspace): self
  174.     {
  175.         $this->invitationEspace $invitationEspace;
  176.         return $this;
  177.     }
  178. }