src/Entity/ExtraType.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ExtraTypeRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassExtraTypeRepository::class)]
  8. class ExtraType
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\Column(length255)]
  15.     private ?string $name null;
  16.     #[ORM\OneToOne(cascade: ['persist''remove'])]
  17.     private ?FileData $image null;
  18.    public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getName(): ?string
  23.     {
  24.         return $this->name;
  25.     }
  26.     public function setName(string $name): static
  27.     {
  28.         $this->name $name;
  29.         return $this;
  30.     }
  31.     public function getImage(): ?FileData
  32.     {
  33.         return $this->image;
  34.     }
  35.     public function setImage(?FileData $image): static
  36.     {
  37.         $this->image $image;
  38.         return $this;
  39.     }
  40.     public function __toString(): string
  41.     {
  42.         return  $this->name;
  43.     }
  44. }