<?php
namespace App\Entity;
use App\Repository\PhotosRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=PhotosRepository::class)
*/
class Photos
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
* @Groups({"post:read"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
* @Groups({"post:read"})
*/
private $url;
/**
* @ORM\ManyToOne(targetEntity=Product::class, inversedBy="photos")
*/
private $product;
public function getId(): ?int
{
return $this->id;
}
public function getUrl()
{
return $this->url;
}
public function setUrl($url): self
{
$this->url = $url;
return $this;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
}