<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* Item
*
* @ORM\Table(name="item", indexes={@ORM\Index(name="FKitem619466", columns={"tariff_fraction_id"})})
* @ORM\Entity()
*/
class Item
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var int
*
* @ORM\Column(name="quantity", type="integer", nullable=false)
*/
private $quantity;
/**
* @var string|null
*
* @ORM\Column(name="description", type="text", length=65535, nullable=true)
*/
private $description;
/**
* @var \TariffFraction
*
* @ORM\ManyToOne(targetEntity="TariffFraction")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="tariff_fraction_id", referencedColumnName="id", nullable=true)
* })
*/
private $tariffFraction;
/**
* @var \Doctrine\Common\Collections\Collection
*
* @ORM\ManyToMany(targetEntity="Box", mappedBy="item", cascade={"persist"})
*/
private $box = array();
/**
* @ORM\Column(type="float", nullable=true)
*/
private $maxQuantityMetricUnit;
/**
* @ORM\Column(type="string", length=5)
*/
private $metricUnit;
/**
* @ORM\Column(type="float")
*/
private $metricUnitValue;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $label;
/**
* @ORM\ManyToOne(targetEntity=CubaCustomsItem::class, inversedBy="items")
*/
private $cubaCustomsItem;
/**
* @ORM\ManyToOne(targetEntity=CubaCustomsCategory::class, inversedBy="items")
*/
private $cubaCustomsCategory;
public function __construct()
{
$this->box = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getQuantity(): ?int
{
return $this->quantity;
}
public function setQuantity(int $quantity): self
{
$this->quantity = $quantity;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function getTariffFraction(): ?TariffFraction
{
return $this->tariffFraction;
}
public function setTariffFraction(?TariffFraction $tariffFraction): self
{
$this->tariffFraction = $tariffFraction;
return $this;
}
/**
* @return Collection<int, Box>
*/
public function getBox(): Collection
{
return $this->box;
}
public function addBox(Box $box): self
{
if (!$this->box->contains($box)) {
$this->box[] = $box;
$box->addItem($this);
}
return $this;
}
public function removeBox(Box $box): self
{
if ($this->box->removeElement($box)) {
$box->removeItem($this);
}
return $this;
}
public function getMaxQuantityMetricUnit(): ?float
{
return $this->maxQuantityMetricUnit;
}
public function setMaxQuantityMetricUnit(?float $maxQuantityMetricUnit): self
{
$this->maxQuantityMetricUnit = $maxQuantityMetricUnit;
return $this;
}
public function getMetricUnit(): ?string
{
return $this->metricUnit;
}
public function setMetricUnit(string $metricUnit): self
{
$this->metricUnit = $metricUnit;
return $this;
}
public function getMetricUnitValue(): ?float
{
return $this->metricUnitValue;
}
public function setMetricUnitValue(float $metricUnitValue): self
{
$this->metricUnitValue = $metricUnitValue;
return $this;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
public function getCubaCustomsItem(): ?CubaCustomsItem
{
return $this->cubaCustomsItem;
}
public function setCubaCustomsItem(?CubaCustomsItem $cubaCustomsItem): self
{
$this->cubaCustomsItem = $cubaCustomsItem;
return $this;
}
public function getCubaCustomsCategory(): ?CubaCustomsCategory
{
return $this->cubaCustomsCategory;
}
public function setCubaCustomsCategory(?CubaCustomsCategory $cubaCustomsCategory): self
{
$this->cubaCustomsCategory = $cubaCustomsCategory;
return $this;
}
}