<?php
namespace Aviatur\AgentBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Agent.
*
* @ORM\Table(name="agent", indexes={@ORM\Index(name="customer_id", columns={"customer_id"})})
* @ORM\Entity(repositoryClass="Aviatur\AgentBundle\Entity\AgentRepository")
*/
class Agent
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer", nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $id;
/**
*
* @ORM\ManyToOne(targetEntity="Aviatur\CustomerBundle\Entity\Customer", inversedBy="agent")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\CustomerBundle\Entity\Customer $customer = null;
/**
* @var string
*
* @ORM\Column(name="idAgent", type="string", length=10, nullable=true)
*/
protected $idagent;
/**
* @var string
*
* @ORM\Column(name="accountType", type="string", length=50, nullable=true)
*/
protected $accounttype;
/**
* @var string
*
* @ORM\Column(name="accountNumber", type="string", length=100, nullable=true)
*/
protected $accountnumber;
/**
* @var string
*
* @ORM\Column(name="documentOwner", type="string", length=100, nullable=true)
*/
protected $documentowner;
/**
* @var string
*
* @ORM\Column(name="rntFileName", type="string", length=100, nullable=true)
*/
protected $rntfilename;
/**
* @var string
*
* @ORM\Column(name="additionalFileName", type="string", length=100, nullable=true)
*/
protected $aditionalfilename;
/**
* @var string
*
* @ORM\Column(name="certifiedCCFileName", type="string", length=100, nullable=true)
*/
protected $certifiedccfilename;
/**
* @var string
*
* @ORM\Column(name="ownerLegalName", type="string", length=100, nullable=true)
*/
protected $ownerlegalname;
/**
* @var string
*
* @ORM\Column(name="accountOwnerName", type="string", length=100, nullable=true)
*/
protected $accountownername;
/**
* @var string
*
* @ORM\Column(name="bankName", type="string", length=100, nullable=true)
*/
protected $bankname;
/**
* @var string
*
* @ORM\Column(name="website", type="string", length=255, nullable=true)
*/
protected $website;
/**
* @var int
*
* @ORM\Column(name="iata", type="integer", nullable=false)
*/
protected $iata;
/**
* @var string
*
* @ORM\Column(name="parentAgent", type="string", nullable=true)
*/
protected $parentAgent;
/**
*
* @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="agent")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
* })
*/
private ?\Aviatur\AgencyBundle\Entity\Agency $agency = null;
/**
* @var \DateTime
*
* @ORM\Column(name="creationDate", type="datetime", nullable=false)
*/
private $creationdate;
/**
* @var \DateTime
*
* @ORM\Column(name="updateDate", type="datetime", nullable=false)
*/
private $updatedate;
/**
* @var \DateTime
*
* @ORM\Column(name="activationDate", type="datetime", nullable=false)
*/
private $activationdate;
/**
* @ORM\Column(name="isActive", type="boolean", nullable=true)
*/
private bool $isactive = false;
/**
* @ORM\Column(name="isAuthorized", type="boolean", nullable=true)
*/
private bool $isauthorized = false;
/**
* @ORM\OneToMany(targetEntity="Aviatur\AgentBundle\Entity\AgentTransaction", mappedBy="agent", cascade={"all"})
*/
private $agentTransaction;
/**
* @ORM\OneToMany(targetEntity="Aviatur\AgentBundle\Entity\AgentCommission", mappedBy="agent", cascade={"all"})
*/
private $agentCommission;
/**
* Constructor.
*/
public function __construct()
{
$this->agentTransaction = new \Doctrine\Common\Collections\ArrayCollection();
$this->agentCommission = new \Doctrine\Common\Collections\ArrayCollection();
}
public function __toString()
{
$return = (string) $this->getId();
return $return;
}
/**
* Get id.
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set idagent.
*
* @param string $idagent
*
* @return Agent
*/
public function setIdagent($idagent)
{
$this->idagent = $idagent;
return $this;
}
/**
* Get idagent.
*
* @return string
*/
public function getIdagent()
{
return $this->idagent;
}
/**
* Set accounttype.
*
* @param string $accounttype
*
* @return Agent
*/
public function setAccounttype($accounttype)
{
$this->accounttype = $accounttype;
return $this;
}
/**
* Get accounttype.
*
* @return string
*/
public function getAccounttype()
{
return $this->accounttype;
}
/**
* Set accountnumber.
*
* @param string $accountnumber
*
* @return Agent
*/
public function setAccountnumber($accountnumber)
{
$this->accountnumber = $accountnumber;
return $this;
}
/**
* Get accountnumber.
*
* @return string
*/
public function getAccountnumber()
{
return $this->accountnumber;
}
/**
* Set documentowner.
*
* @param string $documentowner
*
* @return Agent
*/
public function setDocumentowner($documentowner)
{
$this->documentowner = $documentowner;
return $this;
}
/**
* Get documentowner.
*
* @return string
*/
public function getDocumentowner()
{
return $this->documentowner;
}
/**
* Set rntfilename.
*
* @param string $rntfilename
*
* @return Agent
*/
public function setRntfilename($rntfilename)
{
$this->rntfilename = $rntfilename;
return $this;
}
/**
* Get rntfilename.
*
* @return string
*/
public function getRntfilename()
{
return $this->rntfilename;
}
/**
* Set aditionalfilename.
*
* @param string $aditionalfilename
*
* @return Agent
*/
public function setAditionalfilename($aditionalfilename)
{
$this->aditionalfilename = $aditionalfilename;
return $this;
}
/**
* Get aditionalfilename.
*
* @return string
*/
public function getAditionalfilename()
{
return $this->aditionalfilename;
}
/**
* Set certifiedccfilename.
*
* @param string $certifiedccfilename
*
* @return Agent
*/
public function setCertifiedccfilename($certifiedccfilename)
{
$this->certifiedccfilename = $certifiedccfilename;
return $this;
}
/**
* Get certifiedccfilename.
*
* @return string
*/
public function getCertifiedccfilename()
{
return $this->certifiedccfilename;
}
/**
* Set ownerlegalname.
*
* @param string $ownerlegalname
*
* @return Agent
*/
public function setOwnerlegalname($ownerlegalname)
{
$this->ownerlegalname = $ownerlegalname;
return $this;
}
/**
* Get ownerlegalname.
*
* @return string
*/
public function getOwnerlegalname()
{
return $this->ownerlegalname;
}
/**
* Set accountownername.
*
* @param string $accountownername
*
* @return Agent
*/
public function setAccountownername($accountownername)
{
$this->accountownername = $accountownername;
return $this;
}
/**
* Get accountownername.
*
* @return string
*/
public function getAccountownername()
{
return $this->accountownername;
}
/**
* Set bankname.
*
* @param string $bankname
*
* @return Agent
*/
public function setBankname($bankname)
{
$this->bankname = $bankname;
return $this;
}
/**
* Get bankname.
*
* @return string
*/
public function getBankname()
{
return $this->bankname;
}
/**
* Set website.
*
* @param string $website
*
* @return Agent
*/
public function setWebsite($website)
{
$this->website = $website;
return $this;
}
/**
* Get website.
*
* @return string
*/
public function getWebsite()
{
return $this->website;
}
/**
* Set iata.
*
* @param int $iata
*
* @return Agent
*/
public function setIata($iata)
{
$this->iata = $iata;
return $this;
}
/**
* Get iata.
*
* @return int
*/
public function getIata()
{
return $this->iata;
}
/**
* Set agency.
*
* @param \Aviatur\AgencyBundle\Entity\Agency $agency
*
* @return Agency
*/
public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency = null)
{
$this->agency = $agency;
return $this;
}
/**
* Get agency.
*
* @return \Aviatur\AgencyBundle\Entity\Agency
*/
public function getAgency()
{
return $this->agency;
}
/**
* Set creationdate.
*
* @param \DateTime $creationdate
*
* @return Agent
*/
public function setCreationdate($creationdate)
{
$this->creationdate = $creationdate;
return $this;
}
/**
* Get creationdate.
*
* @return \DateTime
*/
public function getCreationdate()
{
return $this->creationdate;
}
/**
* Set updatedate.
*
* @param \DateTime $updatedate
*
* @return Agent
*/
public function setUpdatedate($updatedate)
{
$this->updatedate = $updatedate;
return $this;
}
/**
* Get updatedate.
*
* @return \DateTime
*/
public function getUpdatedate()
{
return $this->updatedate;
}
/**
* Set activationdate.
*
* @param \DateTime $activationdate
*
* @return Agent
*/
public function setActivationdate($activationdate)
{
$this->activationdate = $activationdate;
return $this;
}
/**
* Get activationdate.
*
* @return \DateTime
*/
public function getActivationdate()
{
return $this->activationdate;
}
/**
* Set isactive.
*
* @param bool $isactive
*
* @return Agent
*/
public function setIsactive($isactive)
{
$this->isactive = $isactive;
return $this;
}
/**
* Get isactive.
*
* @return bool
*/
public function getIsactive()
{
return $this->isactive;
}
/**
* Set isauthorized.
*
* @param bool $isauthorized
*
* @return Agent
*/
public function setIsauthorized($isauthorized)
{
$this->isauthorized = $isauthorized;
return $this;
}
/**
* Get isauthorized.
*
* @return bool
*/
public function getIsauthorized()
{
return $this->isauthorized;
}
/**
* Set customer.
*
* @param \Aviatur\CustomerBundle\Entity\Customer $customer
*
* @return Agent
*/
public function setCustomer(\Aviatur\CustomerBundle\Entity\Customer $customer = null)
{
$this->customer = $customer;
return $this;
}
/**
* Get customer.
*
* @return \Aviatur\CustomerBundle\Entity\Customer
*/
public function getCustomer()
{
return $this->customer;
}
/**
* Add agentTransaction.
*
* @return Agent
*/
public function addAgentTransaction(\Aviatur\AgentBundle\Entity\AgentTransaction $agentTransaction)
{
$this->agentTransaction[] = $agentTransaction;
return $this;
}
/**
* Remove agentTransaction.
*/
public function removeAgentTransaction(\Aviatur\AgentBundle\Entity\AgentTransaction $agentTransaction)
{
$this->agentTransaction->removeElement($agentTransaction);
}
/**
* Get agentTransaction.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getAgentTransaction()
{
return $this->agentTransaction;
}
/**
* Add agentCommission.
*
* @return Agent
*/
public function addAgentCommission(\Aviatur\AgentBundle\Entity\AgentCommission $agentCommission)
{
$this->agentCommission[] = $agentCommission;
return $this;
}
/**
* Remove agentCommission.
*/
public function removeAgentCommission(\Aviatur\AgentBundle\Entity\AgentCommission $agentCommission)
{
$this->agentTransaction->removeElement($agentCommission);
}
/**
* Get agentCommission.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getAgentCommission()
{
return $this->agentCommission;
}
/**
* Set parentAgent.
*
* @param string $parentAgent
*
* @return Agent
*/
public function setParentagent($parentAgent)
{
$this->parentAgent = $parentAgent;
return $this;
}
/**
* Get parentAgent.
*
* @return string
*/
public function getParentagent()
{
return $this->parentAgent;
}
}