src/Entity/Participant.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\ParticipantRepository;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ParticipantRepository::class)
  7.  */
  8. class Participant
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255, nullable=true)
  18.      */
  19.     private $prenom;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $nom;
  24.     /**
  25.      * @ORM\Column(type="string", length=255, nullable=true)
  26.      */
  27.     private $email;
  28.     /**
  29.      * @ORM\ManyToOne(targetEntity=Reservation::class, inversedBy="participants")
  30.      * @ORM\JoinColumn(nullable=true)
  31.      */
  32.     private $reservation;
  33.     /**
  34.      * @ORM\ManyToOne(targetEntity=Token::class, inversedBy="participants")
  35.      * @ORM\JoinColumn(nullable=true)
  36.      */
  37.     private $token;
  38.     public function __clone()
  39.     {
  40.         $this->setReservation(null);
  41.         $this->setToken(null);
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getPrenom(): ?string
  48.     {
  49.         return ucfirst(strtolower($this->prenom));
  50.     }
  51.     public function setPrenom(string $prenom): self
  52.     {
  53.         $this->prenom $prenom;
  54.         return $this;
  55.     }
  56.     public function getNom(): ?string
  57.     {
  58.         return ucfirst(strtolower($this->nom));
  59.     }
  60.     public function setNom(string $nom): self
  61.     {
  62.         $this->nom $nom;
  63.         return $this;
  64.     }
  65.     public function getEmail(): ?string
  66.     {
  67.         return $this->email;
  68.     }
  69.     public function setEmail(?string $email): self
  70.     {
  71.         $this->email $email;
  72.         return $this;
  73.     }
  74.     public function getReservation(): ?Reservation
  75.     {
  76.         return $this->reservation;
  77.     }
  78.     public function setReservation(?Reservation $reservation): self
  79.     {
  80.         $this->reservation $reservation;
  81.         return $this;
  82.     }
  83.     public function getToken(): ?Token
  84.     {
  85.         return $this->token;
  86.     }
  87.     public function setToken(?Token $token): self
  88.     {
  89.         $this->token $token;
  90.         return $this;
  91.     }
  92. }