<?php
namespace App\Entity;
use App\Repository\ProcessingRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProcessingRepository::class)]
class Processing
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $type = null;
#[ORM\Column(length: 255)]
private ?string $quality = null;
#[ORM\Column(type: Types::DATE_MUTABLE)]
private ?\DateTimeInterface $date = null;
#[ORM\ManyToMany(targetEntity: Image::class, mappedBy: 'processing')]
private Collection $fk_image;
public function __construct()
{
$this->fk_image = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getType(): ?string
{
return $this->type;
}
public function setType(string $type): static
{
$this->type = $type;
return $this;
}
public function getQuality(): ?string
{
return $this->quality;
}
public function setQuality(string $quality): static
{
$this->quality = $quality;
return $this;
}
public function getDate(): ?\DateTimeInterface
{
return $this->date;
}
public function setDate(\DateTimeInterface $date): static
{
$this->date = $date;
return $this;
}
/**
* @return Collection<int, Image>
*/
public function getFkImage(): Collection
{
return $this->fk_image;
}
public function addFkImage(Image $fkImage): static
{
if (!$this->fk_image->contains($fkImage)) {
$this->fk_image->add($fkImage);
$fkImage->addProcessing($this);
}
return $this;
}
public function removeFkImage(Image $fkImage): static
{
if ($this->fk_image->removeElement($fkImage)) {
$fkImage->removeProcessing($this);
}
return $this;
}
}