src/Entity/StockInfo.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StockInfoRepository;
  4. use App\Utils\CurrencyHelper;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassStockInfoRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class StockInfo extends BaseEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityProduct::class, inversedBy'stockInfos')]
  15.     private $product;
  16.     #[ORM\ManyToOne(targetEntityWarehouse::class, inversedBy'stockInfos')]
  17.     private $warehouse;
  18.     #[ORM\Column(type'float')]
  19.     private $totalQuantity;
  20.     public function getId(): ?int
  21.     {
  22.         return $this->id;
  23.     }
  24.     public function getProduct(): ?Product
  25.     {
  26.         return $this->product;
  27.     }
  28.     public function setProduct(?Product $product): self
  29.     {
  30.         $this->product $product;
  31.         return $this;
  32.     }
  33.     public function getWarehouse(): ?Warehouse
  34.     {
  35.         return $this->warehouse;
  36.     }
  37.     public function setWarehouse(?Warehouse $warehouse): self
  38.     {
  39.         $this->warehouse $warehouse;
  40.         return $this;
  41.     }
  42.     public function getTotalQuantity(): mixed
  43.     {
  44.         return $this->totalQuantity;
  45.     }
  46.     public function setTotalQuantity(float $totalQuantity): self
  47.     {
  48.         $this->totalQuantity $totalQuantity;
  49.         return $this;
  50.     }
  51. }