<?php
namespace App\Entity;
use App\Repository\ClinicProductsRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ClinicProductsRepository::class)]
class ClinicProducts
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Clinics::class, inversedBy: 'clinicProducts')]
private $clinic;
#[ORM\ManyToOne(targetEntity: Products::class, inversedBy: 'clinicProducts')]
private $product;
#[ORM\ManyToOne(targetEntity: Distributors::class, inversedBy: 'clinicProducts')]
private $distributor;
#[ORM\Column(type: 'datetime')]
private $modified;
#[ORM\Column(type: 'datetime')]
private $created;
#[ORM\Column(type: 'string', length: 255)]
private $savedBy;
#[ORM\Column(type: 'string', length: 255)]
private $name;
#[ORM\Column(type: 'integer')]
private $qty;
#[ORM\Column(type: 'float')]
private $unitPrice;
#[ORM\Column(type: 'float')]
private $total;
#[ORM\Column(type: 'string', length: 255, nullable: true)]
private $itemId;
public function __construct()
{
$this->setCreated(new \DateTime());
if ($this->getModified() == null) {
$this->setModified(new \DateTime());
}
}
public function getId(): ?int
{
return $this->id;
}
public function getClinic(): ?Clinics
{
return $this->clinic;
}
public function setClinic(?Clinics $clinic): self
{
$this->clinic = $clinic;
return $this;
}
public function getProduct(): ?Products
{
return $this->product;
}
public function setProduct(?Products $product): self
{
$this->product = $product;
return $this;
}
public function getDistributor(): ?Distributors
{
return $this->distributor;
}
public function setDistributor(?Distributors $distributor): self
{
$this->distributor = $distributor;
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 getSavedBy(): ?string
{
return $this->savedBy;
}
public function setSavedBy(string $savedBy): self
{
$this->savedBy = $savedBy;
return $this;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
public function getQty(): ?int
{
return $this->qty;
}
public function setQty(int $qty): self
{
$this->qty = $qty;
return $this;
}
public function getUnitPrice(): ?float
{
return $this->unitPrice;
}
public function setUnitPrice(float $unitPrice): self
{
$this->unitPrice = $unitPrice;
return $this;
}
public function getTotal(): ?float
{
return $this->total;
}
public function setTotal(float $total): self
{
$this->total = $total;
return $this;
}
public function getItemId(): ?string
{
return $this->itemId;
}
public function setItemId(?string $itemId): self
{
$this->itemId = $itemId;
return $this;
}
}