src/Entity/ParticipantConversation.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParticipantConversationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=ParticipantConversationRepository::class)
  8.  */
  9. class ParticipantConversation
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups("message")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\ManyToOne(targetEntity=Conversation::class, inversedBy="participants")
  20.      */
  21.     private $conversation;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="participants")
  24.      * @Groups("message")
  25.      */
  26.     private $user;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getConversation(): ?Conversation
  32.     {
  33.         return $this->conversation;
  34.     }
  35.     public function setConversation(?Conversation $conversation): self
  36.     {
  37.         $this->conversation $conversation;
  38.         return $this;
  39.     }
  40.     public function getUser(): ?User
  41.     {
  42.         return $this->user;
  43.     }
  44.     public function setUser(?User $user): self
  45.     {
  46.         $this->user $user;
  47.         return $this;
  48.     }
  49. }