<?php
namespace App\Entity;
use App\Repository\ProductRetailRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ProductRetailRepository::class)]
class ProductRetail
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Products::class, inversedBy: 'productRetails')]
private $product;
#[ORM\ManyToOne(targetEntity: Clinics::class, inversedBy: 'productRetails')]
private $clinic;
#[ORM\Column(type: 'datetime')]
private $modified;
#[ORM\Column(type: 'datetime')]
private $created;
public function __construct()
{
$this->setModified(new \DateTime());
if ($this->getCreated() == null) {
$this->setCreated(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 getClinic(): ?Clinics
{
return $this->clinic;
}
public function setClinic(?Clinics $clinic): self
{
$this->clinic = $clinic;
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;
}
}