<?php
namespace App\Entity;
use App\Repository\ProductImagesRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProductImagesRepository::class)]
class ProductImages
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Products::class, inversedBy: 'productImages')]
#[ORM\JoinColumn(nullable: false)]
private $product;
#[ORM\Column(type: 'string', length: 255)]
private $image;
#[ORM\Column(type: 'datetime')]
private $modified;
#[ORM\Column(type: 'datetime')]
private $created;
#[ORM\Column(type: 'boolean', nullable: true)]
private $isDefault;
#[ORM\Column(type: 'integer', nullable: true)]
private $file_type;
public function __construct()
{
$this->setCreated(new \DateTime());
if ($this->getModified() == null) {
$this->setModified(new \DateTime());
}
}
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Products
{
return $this->product;
}
public function setProduct(?Products $product): self
{
$this->product = $product;
return $this;
}
public function getImage(): ?string
{
return $this->image;
}
public function setImage(string $image): self
{
$this->image = $image;
return $this;
}
public function getModified(): ?\DateTimeInterface
{
return $this->modified;
}
public function setModified(\DateTimeInterface $modified): self
{
$this->modified = $modified;
return $this;
}
public function getCreated(): ?\DateTimeInterface
{
return $this->created;
}
public function setCreated(\DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function getIsDefault(): ?bool
{
return $this->isDefault;
}
public function setIsDefault(?bool $isDefault): self
{
$this->isDefault = $isDefault;
return $this;
}
public function getFileType(): ?int
{
return $this->file_type;
}
public function setFileType(?int $file_type): self
{
$this->file_type = $file_type;
return $this;
}
}