src/Entity/Olympiad/Online/Attendant/AttendantParticipant.php line 14

  1. <?php
  2. namespace App\Entity\Olympiad\Online\Attendant;
  3. use App\Entity\Common\File;
  4. use App\Entity\Olympiad\Online\Participant;
  5. use App\Entity\Traits\CreatedTrait;
  6. use App\Entity\Traits\UpdatedTrait;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Table(name'olymp_online_attendant_participants')]
  9. #[ORM\Entity(repositoryClass'App\Repository\Olympiad\Online\AttendantParticipantRepository')]
  10. #[ORM\HasLifecycleCallbacks]
  11. class AttendantParticipant
  12. {
  13.     use CreatedTrait;
  14.     use UpdatedTrait;
  15.     #[ORM\Id]
  16.     #[ORM\GeneratedValue(strategy'AUTO')]
  17.     #[ORM\Column(type'integer')]
  18.     private ?int $id null;
  19.     /**
  20.      * @var Participant
  21.      */
  22.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Online\Participant')]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private Participant $participant;
  25.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Online\Attendant\Attendant'inversedBy'participants')]
  26.     #[ORM\JoinColumn(nullablefalse)]
  27.     private Attendant $attendant;
  28.     /**
  29.      * @var File|null
  30.      */
  31.     #[ORM\ManyToOne(targetEntity'App\Entity\Common\File'cascade: ['persist''remove'])]
  32.     private ?File $attorney;
  33.     /**
  34.      * @return int|null
  35.      */
  36.     public function getId(): ?int
  37.     {
  38.         return $this->id;
  39.     }
  40.     /**
  41.      * @param int|null $id
  42.      */
  43.     public function setId(?int $id): void
  44.     {
  45.         $this->id $id;
  46.     }
  47.     /**
  48.      * @return Participant
  49.      */
  50.     public function getParticipant(): Participant
  51.     {
  52.         return $this->participant;
  53.     }
  54.     /**
  55.      * @param Participant $participant
  56.      */
  57.     public function setParticipant(Participant $participant): void
  58.     {
  59.         $this->participant $participant;
  60.     }
  61.     /**
  62.      * @return Attendant
  63.      */
  64.     public function getAttendant(): Attendant
  65.     {
  66.         return $this->attendant;
  67.     }
  68.     /**
  69.      * @param Attendant $attendant
  70.      */
  71.     public function setAttendant(Attendant $attendant): void
  72.     {
  73.         $this->attendant $attendant;
  74.     }
  75.     /**
  76.      * @return File|null
  77.      */
  78.     public function getAttorney(): ?File
  79.     {
  80.         return $this->attorney;
  81.     }
  82.     /**
  83.      * @param File|null $attorney
  84.      */
  85.     public function setAttorney(?File $attorney): void
  86.     {
  87.         $this->attorney $attorney;
  88.     }
  89. }