<?php
namespace App\Entity;
use App\Repository\ContainerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: ContainerRepository::class)]
class Container extends BaseEntity
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 255)]
private $containerNumber;
#[ORM\Column(type: 'decimal', precision: 19, scale: 4)]
private $totalPrice;
#[ORM\Column(type: 'decimal', precision: 19, scale: 4)]
private $totalProductUnit;
#[ORM\Column(type: 'decimal', precision: 19, scale: 4)]
private $totalNavlun;
#[ORM\Column(type: 'decimal', precision: 19, scale: 4)]
private $unitNavlunPrice;
#[ORM\ManyToOne(targetEntity: NewStockTransfer::class, inversedBy: 'containers')]
private $newStockTransfer;
#[ORM\OneToMany(mappedBy: 'container', targetEntity: NewTransferProducts::class)]
private $newTransferProducts;
#[ORM\Column(type: 'boolean', nullable: true)]
private $isTransfered;
#[ORM\Column(type: 'float', nullable: true)]
private $onaylananQuantity;
public function __construct()
{
$this->newTransferProducts = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getContainerNumber(): ?string
{
return $this->containerNumber;
}
public function setContainerNumber(string $containerNumber): self
{
$this->containerNumber = $containerNumber;
return $this;
}
public function getTotalPrice(): ?float
{
return $this->totalPrice;
}
public function setTotalPrice(float $totalPrice): self
{
$this->totalPrice = $totalPrice;
return $this;
}
public function getTotalProductUnit(): ?float
{
return $this->totalProductUnit;
}
public function setTotalProductUnit(float $totalProductUnit): self
{
$this->totalProductUnit = $totalProductUnit;
return $this;
}
public function getTotalNavlun(): ?float
{
return $this->totalNavlun;
}
public function setTotalNavlun(float $totalNavlun): self
{
$this->totalNavlun = $totalNavlun;
return $this;
}
public function getUnitNavlunPrice(): ?float
{
return $this->unitNavlunPrice;
}
public function setUnitNavlunPrice(float $unitNavlunPrice): self
{
$this->unitNavlunPrice = $unitNavlunPrice;
return $this;
}
public function getNewStockTransfer(): ?NewStockTransfer
{
return $this->newStockTransfer;
}
public function setNewStockTransfer(?NewStockTransfer $newStockTransfer): self
{
$this->newStockTransfer = $newStockTransfer;
return $this;
}
/**
* @return Collection<int, NewTransferProducts>
*/
public function getNewTransferProducts(): Collection
{
return $this->newTransferProducts;
}
public function addNewTransferProduct(NewTransferProducts $newTransferProduct): self
{
if (!$this->newTransferProducts->contains($newTransferProduct)) {
$this->newTransferProducts[] = $newTransferProduct;
$newTransferProduct->setContainer($this);
}
return $this;
}
public function removeNewTransferProduct(NewTransferProducts $newTransferProduct): self
{
if ($this->newTransferProducts->removeElement($newTransferProduct)) {
// set the owning side to null (unless already changed)
if ($newTransferProduct->getContainer() === $this) {
$newTransferProduct->setContainer(null);
}
}
return $this;
}
/**
* @return bool
*/
public function isTransfered(): bool
{
return $this->isTransfered;
}
/**
* @param bool $isTransfered
*/
public function setIsTransfered(bool $isTransfered): void
{
$this->isTransfered = $isTransfered;
}
/**
* @return mixed
*/
public function getOnaylananQuantity()
{
return $this->onaylananQuantity;
}
/**
* @param mixed $onaylananQuantity
*/
public function setOnaylananQuantity($onaylananQuantity): void
{
$this->onaylananQuantity = $onaylananQuantity;
}
}