<?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* TariffFraction
*
* @ORM\Table(name="tariff_fraction", uniqueConstraints={@ORM\UniqueConstraint(name="code", columns={"code"})})
* @ORM\Entity()
*/
class TariffFraction
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="code", type="string", length=255, nullable=false)
*/
private $code;
/**
* @var string|null
*
* @ORM\Column(name="description", type="text", length=65535, nullable=true)
*/
private $description;
/**
* @ORM\ManyToOne(targetEntity=CubaCustomsItem::class, inversedBy="tariffFractions")
*/
private $cubaCustomsItem;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $startValidityDate;
/**
* @ORM\Column(type="date", nullable=true)
*/
private $endValidityDate;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $measureUnit;
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getDescription(): ?string
{
return $this->description;
}
public function setDescription(?string $description): self
{
$this->description = $description;
return $this;
}
public function __toString()
{
return $this->code . ' (' . $this->description . ')';
}
public function getCubaCustomsItem(): ?CubaCustomsItem
{
return $this->cubaCustomsItem;
}
public function setCubaCustomsItem(?CubaCustomsItem $cubaCustomsItem): self
{
$this->cubaCustomsItem = $cubaCustomsItem;
return $this;
}
public function getStartValidityDate(): ?\DateTimeInterface
{
return $this->startValidityDate;
}
public function setStartValidityDate(?\DateTimeInterface $startValidityDate): self
{
$this->startValidityDate = $startValidityDate;
return $this;
}
public function getEndValidityDate(): ?\DateTimeInterface
{
return $this->endValidityDate;
}
public function setEndValidityDate(?\DateTimeInterface $endValidityDate): self
{
$this->endValidityDate = $endValidityDate;
return $this;
}
public function getMeasureUnit(): ?string
{
return $this->measureUnit;
}
public function setMeasureUnit(?string $measureUnit): self
{
$this->measureUnit = $measureUnit;
return $this;
}
}