src/Aviatur/TrmBundle/Entity/Trm.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\TrmBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Trm
  6.  *
  7.  * @ORM\Table(name="trm", indexes={@ORM\Index(name="from_currency_id", columns={"from_currency_id"}), @ORM\Index(name="to_currency_id", columns={"to_currency_id"}), @ORM\Index(name="rate_id", columns={"rate_id"})})
  8.  * @ORM\Entity(repositoryClass="Aviatur\TrmBundle\Entity\TrmRepository")
  9.  */
  10. class Trm
  11. {
  12.     /**
  13.      * @var integer
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      *
  22.      * @ORM\ManyToOne(targetEntity="Currency", inversedBy="trmFromCurrency")
  23.      * @ORM\JoinColumns({
  24.      *   @ORM\JoinColumn(name="from_currency_id", referencedColumnName="id")
  25.      * })
  26.      */
  27.     private ?\Aviatur\TrmBundle\Entity\Currency $fromCurrency null;
  28.     /**
  29.      *
  30.      * @ORM\ManyToOne(targetEntity="Currency", inversedBy="trmToCurrency")
  31.      * @ORM\JoinColumns({
  32.      *   @ORM\JoinColumn(name="to_currency_id", referencedColumnName="id")
  33.      * })
  34.      */
  35.     private ?\Aviatur\TrmBundle\Entity\Currency $toCurrency null;
  36.     /**
  37.      *
  38.      * @ORM\ManyToOne(targetEntity="Rate", inversedBy="trm")
  39.      * @ORM\JoinColumns({
  40.      *   @ORM\JoinColumn(name="rate_id", referencedColumnName="id")
  41.      * })
  42.      */
  43.     private ?\Aviatur\TrmBundle\Entity\Rate $rate null;
  44.     /**
  45.      * Get id
  46.      *
  47.      * @return integer 
  48.      */
  49.     public function getId()
  50.     {
  51.         return $this->id;
  52.     }
  53.     /**
  54.      * Set fromCurrency
  55.      *
  56.      * @param \Aviatur\TrmBundle\Entity\Currency $fromCurrency
  57.      * @return Trm
  58.      */
  59.     public function setFromCurrency(\Aviatur\TrmBundle\Entity\Currency $fromCurrency null)
  60.     {
  61.         $this->fromCurrency $fromCurrency;
  62.     
  63.         return $this;
  64.     }
  65.     /**
  66.      * Get fromCurrency
  67.      *
  68.      * @return \Aviatur\TrmBundle\Entity\Currency 
  69.      */
  70.     public function getFromCurrency()
  71.     {
  72.         return $this->fromCurrency;
  73.     }
  74.     /**
  75.      * Set toCurrency
  76.      *
  77.      * @param \Aviatur\TrmBundle\Entity\Currency $toCurrency
  78.      * @return Trm
  79.      */
  80.     public function setToCurrency(\Aviatur\TrmBundle\Entity\Currency $toCurrency null)
  81.     {
  82.         $this->toCurrency $toCurrency;
  83.     
  84.         return $this;
  85.     }
  86.     /**
  87.      * Get toCurrency
  88.      *
  89.      * @return \Aviatur\TrmBundle\Entity\Currency 
  90.      */
  91.     public function getToCurrency()
  92.     {
  93.         return $this->toCurrency;
  94.     }
  95.     /**
  96.      * Set rate
  97.      *
  98.      * @param \Aviatur\TrmBundle\Entity\Rate $rate
  99.      * @return Trm
  100.      */
  101.     public function setRate(\Aviatur\TrmBundle\Entity\Rate $rate null)
  102.     {
  103.         $this->rate $rate;
  104.     
  105.         return $this;
  106.     }
  107.     /**
  108.      * Get rate
  109.      *
  110.      * @return \Aviatur\TrmBundle\Entity\Rate 
  111.      */
  112.     public function getRate()
  113.     {
  114.         return $this->rate;
  115.     }
  116. }