src/Entity/DivisaConversion.php line 21
- <?php
- namespace App\Entity;
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\Validator\Constraints as Assert;
- use Doctrine\Common\Collections\ArrayCollection;
- use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
- use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
- use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
- /**
- * DivisaConversion
- *
- * @ORM\Table(name="divisa_conversion", uniqueConstraints={
- * @ORM\UniqueConstraint(name="par_divisas", columns={"divisaOrigen", "divisaDestino"})
- * })
- * @ORM\Entity(repositoryClass="App\Repository\DivisaConversionRepository")
- */
- class DivisaConversion implements TranslatableInterface
- {
- use TranslatableTrait;
- /**
- * @var integer
- *
- * @ORM\Column(name="id", type="integer")
- * @ORM\Id
- * @ORM\GeneratedValue(strategy="AUTO")
- */
- private $id;
- /**
- * @ORM\ManyToOne(targetEntity="Divisa")
- * @ORM\JoinColumn(name="divisaOrigen", referencedColumnName="id", nullable=false)
- */
- private $divisaOrigen;
- /**
- * @ORM\ManyToOne(targetEntity="Divisa")
- * @ORM\JoinColumn(name="divisaDestino", referencedColumnName="id", nullable=false)
- */
- private $divisaDestino;
- /**
- * @var integer
- *
- * @ORM\Column(name="visitas", type="integer")
- */
- private $visitas=0;
- public function __call($method, $args)
- {
- //return $this->proxyCurrentLocaleTranslation($method, $arguments);
- if (!method_exists(self::getTranslationEntityClass(), $method)) {
- $method = 'get'. ucfirst($method);
- }
- return $this->proxyCurrentLocaleTranslation($method, $args);
- }
- public function __construct() {
- $this->traducciones = new ArrayCollection();
- }
- /**
- * Get id
- *
- * @return integer
- */
- public function getId()
- {
- return $this->id;
- }
- /**
- * Set divisaOrigen
- *
- * @param integer $divisaOrigen
- * @return DivisaConversion
- */
- public function setDivisaOrigen($divisaOrigen)
- {
- $this->divisaOrigen = $divisaOrigen;
- return $this;
- }
- /**
- * Get divisaOrigen
- *
- * @return integer
- */
- public function getDivisaOrigen()
- {
- return $this->divisaOrigen;
- }
- /**
- * Set divisaDestino
- *
- * @param integer $divisaDestino
- * @return DivisaConversion
- */
- public function setDivisaDestino($divisaDestino)
- {
- $this->divisaDestino = $divisaDestino;
- return $this;
- }
- /**
- * Get divisaDestino
- *
- * @return integer
- */
- public function getDivisaDestino()
- {
- return $this->divisaDestino;
- }
- /**
- * Set visitas
- *
- * @param integer $visitas
- * @return DivisaConversion
- */
- public function setVisitas($visitas)
- {
- $this->visitas = $visitas;
- return $this;
- }
- /**
- * Get visitas
- *
- * @return integer
- */
- public function getVisitas()
- {
- return $this->visitas;
- }
- }