src/Entity/Stock.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StockRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassStockRepository::class)]
  8. class Stock extends BaseEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\Column(type'float')]
  15.     private $quantity;
  16.     #[ORM\ManyToOne(targetEntityWarehouse::class, inversedBy'stocks')]
  17.     #[ORM\JoinColumn(nullablefalse)]
  18.     private $warehouse;
  19.     #[ORM\ManyToOne(targetEntityProduct::class, inversedBy'stocks')]
  20.     private $product;
  21.     #[ORM\Column(name'invoice_number'type'string'nullabletrue)]
  22.     private $invoiceNumber;
  23.     #[ORM\Column(name'container_number'type'string'nullabletrue)]
  24.     private $containerNumber;
  25.     #[ORM\Column(name'konsimento'type'string'nullabletrue)]
  26.     private $konsimento;
  27.     #[ORM\Column(name'price_fob'type'decimal'precision19scale4)]
  28.     private $priceFob;
  29.     #[ORM\Column(name'price_navlun'type'decimal'precision19scale4nullabletrue)]
  30.     private $priceNavlun;
  31.     #[ORM\Column(name'total_unit_price'type'decimal'precision19scale4)]
  32.     private $totalUnitPrice;
  33.     #[ORM\Column(name'purchase_total_amount'type'decimal'precision19scale4)]
  34.     private $purchaseTotalAmount;
  35.     #[ORM\Column(name'buying_company'type'string')]
  36.     private $buyingCompany;
  37.     #[ORM\Column(name'buying_date'type'date_immutable'nullablefalse)]
  38.     private $buyingDate;
  39.     #[ORM\Column(name'warehouse_arrival_date'type'date_immutable'nullabletrue)]
  40.     private $warehouseArrivalDate;
  41.     #[ORM\ManyToOne(targetEntityStockTransfer::class, inversedBy'stock')]
  42.     private $stockTransfer;
  43.     #[ORM\ManyToOne(targetEntityNewStockTransfer::class)]
  44.     private $newStockTransfer;
  45.     public function __toString(): string
  46.     {
  47.         return $this->getProduct() . ' ( Stock : ' $this->getQuantity() . ' )';
  48.     }
  49.     /**
  50.      * @return mixed
  51.      */
  52.     public function getNewStockTransfer()
  53.     {
  54.         return $this->newStockTransfer;
  55.     }
  56.     /**
  57.      * @param mixed $newStockTransfer
  58.      */
  59.     public function setNewStockTransfer($newStockTransfer): void
  60.     {
  61.         $this->newStockTransfer $newStockTransfer;
  62.     }
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getQuantity(): ?float
  68.     {
  69.         return $this->quantity;
  70.     }
  71.     public function setQuantity(float $quantity): self
  72.     {
  73.         $this->quantity $quantity;
  74.         return $this;
  75.     }
  76.     public function getWarehouse(): ?Warehouse
  77.     {
  78.         return $this->warehouse;
  79.     }
  80.     public function setWarehouse(?Warehouse $warehouse): self
  81.     {
  82.         $this->warehouse $warehouse;
  83.         return $this;
  84.     }
  85.     public function getProduct(): ?Product
  86.     {
  87.         return $this->product;
  88.     }
  89.     public function setProduct(?Product $product): self
  90.     {
  91.         $this->product $product;
  92.         return $this;
  93.     }
  94.     public function getInvoiceNumber(): ?string
  95.     {
  96.         return $this->invoiceNumber;
  97.     }
  98.     public function setInvoiceNumber(?string $invoiceNumber): self
  99.     {
  100.         $this->invoiceNumber $invoiceNumber;
  101.         return $this;
  102.     }
  103.     public function getContainerNumber(): ?string
  104.     {
  105.         return $this->containerNumber;
  106.     }
  107.     public function setContainerNumber(?string $containerNumber): self
  108.     {
  109.         $this->containerNumber $containerNumber;
  110.         return $this;
  111.     }
  112.     public function getKonsimento(): ?string
  113.     {
  114.         return $this->konsimento;
  115.     }
  116.     public function setKonsimento(?string $konsimento): self
  117.     {
  118.         $this->konsimento $konsimento;
  119.         return $this;
  120.     }
  121.     public function getPriceFob(): ?float
  122.     {
  123.         return $this->priceFob;
  124.     }
  125.     public function setPriceFob(float $priceFob): self
  126.     {
  127.         $this->priceFob $priceFob;
  128.         return $this;
  129.     }
  130.     public function getPriceNavlun(): ?float
  131.     {
  132.         return $this->priceNavlun;
  133.     }
  134.     public function setPriceNavlun(?float $priceNavlun): self
  135.     {
  136.         $this->priceNavlun $priceNavlun;
  137.         return $this;
  138.     }
  139.     public function getTotalUnitPrice(): ?float
  140.     {
  141.         return $this->totalUnitPrice;
  142.     }
  143.     public function setTotalUnitPrice(float $totalUnitPrice): self
  144.     {
  145.         $this->totalUnitPrice $totalUnitPrice;
  146.         return $this;
  147.     }
  148.     public function getPurchaseTotalAmount(): ?float
  149.     {
  150.         return $this->purchaseTotalAmount;
  151.     }
  152.     public function setPurchaseTotalAmount(float $purchaseTotalAmount): self
  153.     {
  154.         $this->purchaseTotalAmount $purchaseTotalAmount;
  155.         return $this;
  156.     }
  157.     public function getBuyingCompany(): ?string
  158.     {
  159.         return $this->buyingCompany;
  160.     }
  161.     public function setBuyingCompany(string $buyingCompany): self
  162.     {
  163.         $this->buyingCompany $buyingCompany;
  164.         return $this;
  165.     }
  166.     public function getBuyingDate(): \DateTimeImmutable|\DateTime|null
  167.     {
  168.         return $this->buyingDate;
  169.     }
  170.     public function setBuyingDate(\DateTimeImmutable|\DateTime $buyingDate): self
  171.     {
  172.         $this->buyingDate $buyingDate;
  173.         return $this;
  174.     }
  175.     public function getWarehouseArrivalDate(): \DateTimeImmutable|\DateTime|null
  176.     {
  177.         return $this->warehouseArrivalDate;
  178.     }
  179.     public function setWarehouseArrivalDate(\DateTimeImmutable|\DateTime $warehouseArrivalDate): self
  180.     {
  181.         $this->warehouseArrivalDate $warehouseArrivalDate;
  182.         return $this;
  183.     }
  184.     public function getStockTransfer(): ?StockTransfer
  185.     {
  186.         return $this->stockTransfer;
  187.     }
  188.     public function setStockTransfer(?StockTransfer $stockTransfer): self
  189.     {
  190.         $this->stockTransfer $stockTransfer;
  191.         return $this;
  192.     }
  193. }