src/Aviatur/GeneralBundle/Entity/PaymentMethod.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\GeneralBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * PaymentMethod.
  6.  *
  7.  * @ORM\Table(name="payment_method")
  8.  * @ORM\Entity
  9.  */
  10. class PaymentMethod
  11. {
  12.     /**
  13.      * @var int
  14.      *
  15.      * @ORM\Column(name="id", type="integer", nullable=false)
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var string
  22.      *
  23.      * @ORM\Column(name="code", type="string", length=255, nullable=false)
  24.      */
  25.     private $code;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="description", type="string", length=255, nullable=false)
  30.      */
  31.     private $description;
  32.     /**
  33.      * @var int
  34.      *
  35.      * @ORM\Column(name="isActive", type="integer", nullable=false)
  36.      */
  37.     private $isactive;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\PaymentMethodAgency", mappedBy="paymentMethod", cascade={"all"})
  40.      */
  41.     private $paymentMethodAgency;
  42.     public function __toString()
  43.     {
  44.         $return $this->getDescription().'('.$this->getCode().')';
  45.         return $return;
  46.     }
  47.     /**
  48.      * Constructor.
  49.      */
  50.     public function __construct()
  51.     {
  52.         $this->paymentMethodAgency = new \Doctrine\Common\Collections\ArrayCollection();
  53.     }
  54.     /**
  55.      * Get id.
  56.      *
  57.      * @return int
  58.      */
  59.     public function getId()
  60.     {
  61.         return $this->id;
  62.     }
  63.     /**
  64.      * Set code.
  65.      *
  66.      * @param string $code
  67.      *
  68.      * @return PaymentMethod
  69.      */
  70.     public function setCode($code)
  71.     {
  72.         $this->code $code;
  73.         return $this;
  74.     }
  75.     /**
  76.      * Get code.
  77.      *
  78.      * @return string
  79.      */
  80.     public function getCode()
  81.     {
  82.         return $this->code;
  83.     }
  84.     /**
  85.      * Set description.
  86.      *
  87.      * @param string $description
  88.      *
  89.      * @return PaymentMethod
  90.      */
  91.     public function setDescription($description)
  92.     {
  93.         $this->description $description;
  94.         return $this;
  95.     }
  96.     /**
  97.      * Get description.
  98.      *
  99.      * @return string
  100.      */
  101.     public function getDescription()
  102.     {
  103.         return $this->description;
  104.     }
  105.     /**
  106.      * Set isactive.
  107.      *
  108.      * @param int $isactive
  109.      *
  110.      * @return PaymentMethod
  111.      */
  112.     public function setIsactive($isactive)
  113.     {
  114.         $this->isactive $isactive;
  115.         return $this;
  116.     }
  117.     /**
  118.      * Get isactive.
  119.      *
  120.      * @return int
  121.      */
  122.     public function getIsactive()
  123.     {
  124.         return $this->isactive;
  125.     }
  126.     /**
  127.      * Add paymentMethodAgency.
  128.      *
  129.      * @return PaymentMethod
  130.      */
  131.     public function addPaymentMethodAgency(\Aviatur\GeneralBundle\Entity\PaymentMethodAgency $paymentMethodAgency)
  132.     {
  133.         $this->paymentMethodAgency[] = $paymentMethodAgency;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Remove paymentMethodAgency.
  138.      */
  139.     public function removePaymentMethodAgency(\Aviatur\GeneralBundle\Entity\PaymentMethodAgency $paymentMethodAgency)
  140.     {
  141.         $this->paymentMethodAgency->removeElement($paymentMethodAgency);
  142.     }
  143.     /**
  144.      * Get paymentMethodAgency.
  145.      *
  146.      * @return \Doctrine\Common\Collections\Collection
  147.      */
  148.     public function getPaymentMethodAgency()
  149.     {
  150.         return $this->paymentMethodAgency;
  151.     }
  152. }