<?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]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $filename = null;
#[ORM\Column(length: 255)]
private ?string $publicurl = null;
/**
* type:
* 1 - justificatif de relevé de prix
* 2 - photo principale du produit
*/
#[ORM\Column]
private int $type;
#[ORM\Column]
private string $stockage;
#[ORM\ManyToOne(targetEntity: Record::class, inversedBy: 'photos')]
private ?Record $record = null;
public function getId(): ?int
{
return $this->id;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setFilename(string $filename): static
{
$this->filename = $filename;
return $this;
}
public function getType(): ?int
{
return $this->type;
}
public function setType(int $type): static
{
$this->type = $type;
return $this;
}
public function getRecord(): ?Record
{
return $this->record;
}
public function setRecord(?Record $record): static
{
$this->record = $record;
return $this;
}
public function getPublicurl(): ?string
{
return $this->publicurl;
}
public function setPublicurl(string $publicurl): static
{
$this->publicurl = $publicurl;
return $this;
}
public function getStockage(): ?string
{
return $this->stockage;
}
public function setStockage(string $stockage): static
{
$this->stockage = $stockage;
return $this;
}
}