src/Entity/MeetParticipant.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MeetParticipantRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. #[ORM\Entity(repositoryClass: MeetParticipantRepository::class)]
  7. class MeetParticipant
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id = null;
  13.     #[ORM\ManyToOne(inversedBy: 'meetParticipants')]
  14.     #[ORM\JoinColumn(onDelete: 'CASCADE')]
  15.     private ?Meeting $meet = null;
  16.     #[ORM\ManyToOne(inversedBy: 'meetParticipants')]
  17.     private ?User $participants = null;
  18.     public function getId(): ?int {
  19.         return $this->id;
  20.     }
  21.     public function getMeet(): ?Meeting
  22.     {
  23.         return $this->meet;
  24.     }
  25.     public function setMeet(?Meeting $meet): self
  26.     {
  27.         $this->meet = $meet;
  28.         return $this;
  29.     }
  30.     public function getParticipants(): ?User
  31.     {
  32.         return $this->participants;
  33.     }
  34.     public function setParticipants(?User $participants): self
  35.     {
  36.         $this->participants = $participants;
  37.         return $this;
  38.     }
  39.     #[Groups(['meetParticipant:read'])]
  40.     public function getParticipant() {
  41.         return $this->participants;
  42.     }
  43. }