<?php
namespace App\Entity;
use App\Repository\PhotoRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: PhotoRepository::class)]
class Photo
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\ManyToOne(targetEntity: ProInfo::class, inversedBy: 'gallery')]
private $pro;
#[ORM\ManyToOne(targetEntity: Course::class, inversedBy: 'photos')]
private $course;
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getPro(): ?ProInfo
{
return $this->pro;
}
public function setPro(?ProInfo $pro): self
{
$this->pro = $pro;
return $this;
}
public function getCourse(): ?Course
{
return $this->course;
}
public function setCourse(?Course $course): self
{
$this->course = $course;
return $this;
}
}