src/Entity/Sport.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SportRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassSportRepository::class)]
  6. class Sport
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column]
  11.     private ?int $id null;
  12.     #[ORM\ManyToOne]
  13.     private ?Events $event null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $name null;
  16.     public function getId(): ?int
  17.     {
  18.         return $this->id;
  19.     }
  20.     public function getEvent(): ?Events
  21.     {
  22.         return $this->event;
  23.     }
  24.     public function setEvent(?Events $event): self
  25.     {
  26.         $this->event $event;
  27.         return $this;
  28.     }
  29.     public function getName(): ?string
  30.     {
  31.         return $this->name;
  32.     }
  33.     public function setName(string $name): self
  34.     {
  35.         $this->name $name;
  36.         return $this;
  37.     }
  38.     public function __toString(): string
  39.     {
  40.         // TODO: Implement __toString() method.
  41.         return $this->name;
  42.     }
  43. }