<?php
namespace App\Entity;
use App\Repository\StockInfoRepository;
use App\Utils\CurrencyHelper;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: StockInfoRepository::class)]
#[ORM\HasLifecycleCallbacks]
class StockInfo extends BaseEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Product::class, inversedBy: 'stockInfos')]
private $product;
#[ORM\ManyToOne(targetEntity: Warehouse::class, inversedBy: 'stockInfos')]
private $warehouse;
#[ORM\Column(type: 'float')]
private $totalQuantity;
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): ?Product
{
return $this->product;
}
public function setProduct(?Product $product): self
{
$this->product = $product;
return $this;
}
public function getWarehouse(): ?Warehouse
{
return $this->warehouse;
}
public function setWarehouse(?Warehouse $warehouse): self
{
$this->warehouse = $warehouse;
return $this;
}
public function getTotalQuantity(): mixed
{
return $this->totalQuantity;
}
public function setTotalQuantity(float $totalQuantity): self
{
$this->totalQuantity = $totalQuantity;
return $this;
}
}