src/Entity/Photo.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PhotoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassPhotoRepository::class)]
  6. class Photo
  7. {
  8.     #[ORM\Id]
  9.     #[ORM\GeneratedValue]
  10.     #[ORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\Column(type'string'length255)]
  13.     private $name;
  14.     #[ORM\ManyToOne(targetEntityProInfo::class, inversedBy'gallery')]
  15.     private $pro;
  16.     #[ORM\ManyToOne(targetEntityCourse::class, inversedBy'photos')]
  17.     private $course;
  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): self
  27.     {
  28.         $this->name $name;
  29.         return $this;
  30.     }
  31.     public function getPro(): ?ProInfo
  32.     {
  33.         return $this->pro;
  34.     }
  35.     public function setPro(?ProInfo $pro): self
  36.     {
  37.         $this->pro $pro;
  38.         return $this;
  39.     }
  40.     public function getCourse(): ?Course
  41.     {
  42.         return $this->course;
  43.     }
  44.     public function setCourse(?Course $course): self
  45.     {
  46.         $this->course $course;
  47.         return $this;
  48.     }
  49. }