src/Entity/Couleur.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CouleurRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassCouleurRepository::class)]
  6. class Couleur
  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(length50nullabletrue)]
  15.     private ?string $nom null;
  16.     #[ORM\Column(length20)]
  17.     private ?string $code null;
  18.     public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getEvent(): ?Events
  23.     {
  24.         return $this->event;
  25.     }
  26.     public function setEvent(?Events $event): self
  27.     {
  28.         $this->event $event;
  29.         return $this;
  30.     }
  31.     public function getNom(): ?string
  32.     {
  33.         return $this->nom;
  34.     }
  35.     public function setNom(?string $nom): self
  36.     {
  37.         $this->nom $nom;
  38.         return $this;
  39.     }
  40.     public function getCode(): ?string
  41.     {
  42.         return $this->code;
  43.     }
  44.     public function setCode(string $code): self
  45.     {
  46.         $this->code $code;
  47.         return $this;
  48.     }
  49.     public function __toString()
  50.     {
  51.        return $this->getNom().' ';
  52.     }
  53. }