<?php
namespace Aviatur\GeneralBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* PaymentMethod.
*
* @ORM\Table(name="payment_method")
* @ORM\Entity
*/
class PaymentMethod
{
/**
* @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
*
* @ORM\Column(name="description", type="string", length=255, nullable=false)
*/
private $description;
/**
* @var int
*
* @ORM\Column(name="isActive", type="integer", nullable=false)
*/
private $isactive;
/**
* @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\PaymentMethodAgency", mappedBy="paymentMethod", cascade={"all"})
*/
private $paymentMethodAgency;
public function __toString()
{
$return = $this->getDescription().'('.$this->getCode().')';
return $return;
}
/**
* Constructor.
*/
public function __construct()
{
$this->paymentMethodAgency = new \Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set code.
*
* @param string $code
*
* @return PaymentMethod
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code.
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set description.
*
* @param string $description
*
* @return PaymentMethod
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* Set isactive.
*
* @param int $isactive
*
* @return PaymentMethod
*/
public function setIsactive($isactive)
{
$this->isactive = $isactive;
return $this;
}
/**
* Get isactive.
*
* @return int
*/
public function getIsactive()
{
return $this->isactive;
}
/**
* Add paymentMethodAgency.
*
* @return PaymentMethod
*/
public function addPaymentMethodAgency(\Aviatur\GeneralBundle\Entity\PaymentMethodAgency $paymentMethodAgency)
{
$this->paymentMethodAgency[] = $paymentMethodAgency;
return $this;
}
/**
* Remove paymentMethodAgency.
*/
public function removePaymentMethodAgency(\Aviatur\GeneralBundle\Entity\PaymentMethodAgency $paymentMethodAgency)
{
$this->paymentMethodAgency->removeElement($paymentMethodAgency);
}
/**
* Get paymentMethodAgency.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getPaymentMethodAgency()
{
return $this->paymentMethodAgency;
}
}