src/Entity/Participant.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ParticipantRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassParticipantRepository::class)]
  6. class Participant
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'participations')]
  13.     private $user;
  14.     #[ORM\Column(type'datetime'nullabletrue)]
  15.     private $messageReadedAt;
  16.     #[ORM\ManyToOne(targetEntityConversation::class, inversedBy'participants')]
  17.     private $conversation;
  18.     public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getUser(): ?User
  23.     {
  24.         return $this->user;
  25.     }
  26.     public function setUser(?User $user): self
  27.     {
  28.         $this->user $user;
  29.         return $this;
  30.     }
  31.     public function getMessageReadedAt(): ?\DateTimeInterface
  32.     {
  33.         return $this->messageReadedAt;
  34.     }
  35.     public function setMessageReadedAt(?\DateTimeInterface $messageReadedAt): self
  36.     {
  37.         $this->messageReadedAt $messageReadedAt;
  38.         return $this;
  39.     }
  40.     public function getConversation(): ?Conversation
  41.     {
  42.         return $this->conversation;
  43.     }
  44.     public function setConversation(?Conversation $conversation): self
  45.     {
  46.         $this->conversation $conversation;
  47.         return $this;
  48.     }
  49. }