<?php
/**
* Waluta
*/
namespace App\Entity;
/**
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(name="currency")
*/
class Currency
{
use \Knp\DoctrineBehaviors\Model\Translatable\Translatable;
use \Knp\DoctrineBehaviors\Model\Blameable\Blameable;
use \Knp\DoctrineBehaviors\Model\Timestampable\Timestampable;
/**
* @Doctrine\ORM\Mapping\Id
* @Doctrine\ORM\Mapping\Column(type="integer")
* @Doctrine\ORM\Mapping\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @Doctrine\ORM\Mapping\Column(type="text", length=255)
*/
protected $sign;
/**
* @Doctrine\ORM\Mapping\Column(name="currency_separator", type="text", length=255)
*/
protected $separator;
/**
* @Doctrine\ORM\Mapping\Column(name="position_price", type="text", length=255)
*/
protected $position;
/**
* Domyślny
* @Doctrine\ORM\Mapping\Column(type="boolean", options={"default"=0})
*/
protected $isDefault;
/**
* Czy aktywny
* @Doctrine\ORM\Mapping\Column(type="boolean", options={"default"=0})
*/
protected $isActive;
/**
* @Doctrine\ORM\Mapping\Column(name="factorPln", nullable=true, type="float")
*/
protected $factorPln;
/**
* @Doctrine\ORM\Mapping\Column(name="iso_code", nullable=true, type="string")
*/
protected $isoCode;
public function __toString()
{
return $this->getSign();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set sign
*
* @param string $sign
*
* @return Currency
*/
public function setSign($sign)
{
$this->sign = $sign;
return $this;
}
/**
* Get sign
*
* @return string
*/
public function getSign()
{
return $this->sign;
}
/**
* Set isDefault
*
* @param boolean $isDefault
*
* @return Currency
*/
public function setIsDefault($isDefault)
{
$this->isDefault = $isDefault;
return $this;
}
/**
* Get isDefault
*
* @return boolean
*/
public function getIsDefault()
{
return $this->isDefault;
}
/**
* Set isActive
*
* @param boolean $isActive
*
* @return Currency
*/
public function setIsActive($isActive)
{
$this->isActive = $isActive;
return $this;
}
/**
* Get isActive
*
* @return boolean
*/
public function getIsActive()
{
return $this->isActive;
}
/**
* Obsługa tłumaczeń
* @param $method
* @param $arguments
* @return mixed
*/
public function __call($method, $arguments)
{
return $this->proxyCurrentLocaleTranslation($method, $arguments);
}
public function getName()
{
return $this->translate()->getName();
}
/**
* Set separator
*
* @param string $separator
*
* @return Currency
*/
public function setSeparator($separator)
{
$this->separator = $separator;
return $this;
}
/**
* Get separator
*
* @return string
*/
public function getSeparator()
{
return $this->separator;
}
/**
* Set position
*
* @param string $position
*
* @return Currency
*/
public function setPosition($position)
{
$this->position = $position;
return $this;
}
/**
* Get position
*
* @return string
*/
public function getPosition()
{
return $this->position;
}
/**
* @return mixed
*/
public function getFactorPln()
{
return $this->factorPln;
}
/**
* @param mixed $factorPln
*/
public function setFactorPln($factorPln): void
{
$this->factorPln = $factorPln;
}
/**
* @return mixed
*/
public function getIsoCode()
{
return $this->isoCode;
}
/**
* @param mixed $isoCode
*/
public function setIsoCode($isoCode)
{
$this->isoCode = $isoCode;
}
}