src/Aviatur/AgentBundle/Entity/Agent.php line 13

Open in your IDE?
  1. <?php
  2. namespace Aviatur\AgentBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Agent.
  6.  *
  7.  * @ORM\Table(name="agent", indexes={@ORM\Index(name="customer_id", columns={"customer_id"})})
  8.  * @ORM\Entity(repositoryClass="Aviatur\AgentBundle\Entity\AgentRepository")
  9.  */
  10. class Agent
  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.      *
  22.      * @ORM\ManyToOne(targetEntity="Aviatur\CustomerBundle\Entity\Customer", inversedBy="agent")
  23.      * @ORM\JoinColumns({
  24.      *   @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  25.      * })
  26.      */
  27.     private ?\Aviatur\CustomerBundle\Entity\Customer $customer null;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="idAgent", type="string", length=10, nullable=true)
  32.      */
  33.     protected $idagent;
  34.     /**
  35.      * @var string
  36.      *
  37.      * @ORM\Column(name="accountType", type="string", length=50, nullable=true)
  38.      */
  39.     protected $accounttype;
  40.     /**
  41.      * @var string
  42.      *
  43.      * @ORM\Column(name="accountNumber", type="string", length=100, nullable=true)
  44.      */
  45.     protected $accountnumber;
  46.     /**
  47.      * @var string
  48.      *
  49.      * @ORM\Column(name="documentOwner", type="string", length=100, nullable=true)
  50.      */
  51.     protected $documentowner;
  52.     /**
  53.      * @var string
  54.      *
  55.      * @ORM\Column(name="rntFileName", type="string", length=100, nullable=true)
  56.      */
  57.     protected $rntfilename;
  58.     /**
  59.      * @var string
  60.      *
  61.      * @ORM\Column(name="additionalFileName", type="string", length=100, nullable=true)
  62.      */
  63.     protected $aditionalfilename;
  64.     /**
  65.      * @var string
  66.      *
  67.      * @ORM\Column(name="certifiedCCFileName", type="string", length=100, nullable=true)
  68.      */
  69.     protected $certifiedccfilename;
  70.     /**
  71.      * @var string
  72.      *
  73.      * @ORM\Column(name="ownerLegalName", type="string", length=100, nullable=true)
  74.      */
  75.     protected $ownerlegalname;
  76.     /**
  77.      * @var string
  78.      *
  79.      * @ORM\Column(name="accountOwnerName", type="string", length=100, nullable=true)
  80.      */
  81.     protected $accountownername;
  82.     /**
  83.      * @var string
  84.      *
  85.      * @ORM\Column(name="bankName", type="string", length=100, nullable=true)
  86.      */
  87.     protected $bankname;
  88.     /**
  89.      * @var string
  90.      *
  91.      * @ORM\Column(name="website", type="string", length=255, nullable=true)
  92.      */
  93.     protected $website;
  94.     /**
  95.      * @var int
  96.      *
  97.      * @ORM\Column(name="iata", type="integer", nullable=false)
  98.      */
  99.     protected $iata;
  100.     /**
  101.      * @var string
  102.      *
  103.      * @ORM\Column(name="parentAgent", type="string", nullable=true)
  104.      */
  105.     protected $parentAgent;
  106.     /**
  107.      *
  108.      * @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="agent")
  109.      * @ORM\JoinColumns({
  110.      *   @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
  111.      * })
  112.      */
  113.     private ?\Aviatur\AgencyBundle\Entity\Agency $agency null;
  114.     /**
  115.      * @var \DateTime
  116.      *
  117.      * @ORM\Column(name="creationDate", type="datetime", nullable=false)
  118.      */
  119.     private $creationdate;
  120.     /**
  121.      * @var \DateTime
  122.      *
  123.      * @ORM\Column(name="updateDate", type="datetime", nullable=false)
  124.      */
  125.     private $updatedate;
  126.     /**
  127.      * @var \DateTime
  128.      *
  129.      * @ORM\Column(name="activationDate", type="datetime", nullable=false)
  130.      */
  131.     private $activationdate;
  132.     /**
  133.      * @ORM\Column(name="isActive", type="boolean", nullable=true)
  134.      */
  135.     private bool $isactive false;
  136.     /**
  137.      * @ORM\Column(name="isAuthorized", type="boolean", nullable=true)
  138.      */
  139.     private bool $isauthorized false;
  140.     /**
  141.      * @ORM\OneToMany(targetEntity="Aviatur\AgentBundle\Entity\AgentTransaction", mappedBy="agent", cascade={"all"})
  142.      */
  143.     private $agentTransaction;
  144.     /**
  145.      * @ORM\OneToMany(targetEntity="Aviatur\AgentBundle\Entity\AgentCommission", mappedBy="agent", cascade={"all"})
  146.      */
  147.     private $agentCommission;
  148.     /**
  149.      * Constructor.
  150.      */
  151.     public function __construct()
  152.     {
  153.         $this->agentTransaction = new \Doctrine\Common\Collections\ArrayCollection();
  154.         $this->agentCommission = new \Doctrine\Common\Collections\ArrayCollection();
  155.     }
  156.     public function __toString()
  157.     {
  158.         $return = (string) $this->getId();
  159.         return $return;
  160.     }
  161.     /**
  162.      * Get id.
  163.      *
  164.      * @return int
  165.      */
  166.     public function getId()
  167.     {
  168.         return $this->id;
  169.     }
  170.     /**
  171.      * Set idagent.
  172.      *
  173.      * @param string $idagent
  174.      *
  175.      * @return Agent
  176.      */
  177.     public function setIdagent($idagent)
  178.     {
  179.         $this->idagent $idagent;
  180.         return $this;
  181.     }
  182.     /**
  183.      * Get idagent.
  184.      *
  185.      * @return string
  186.      */
  187.     public function getIdagent()
  188.     {
  189.         return $this->idagent;
  190.     }
  191.     /**
  192.      * Set accounttype.
  193.      *
  194.      * @param string $accounttype
  195.      *
  196.      * @return Agent
  197.      */
  198.     public function setAccounttype($accounttype)
  199.     {
  200.         $this->accounttype $accounttype;
  201.         return $this;
  202.     }
  203.     /**
  204.      * Get accounttype.
  205.      *
  206.      * @return string
  207.      */
  208.     public function getAccounttype()
  209.     {
  210.         return $this->accounttype;
  211.     }
  212.     /**
  213.      * Set accountnumber.
  214.      *
  215.      * @param string $accountnumber
  216.      *
  217.      * @return Agent
  218.      */
  219.     public function setAccountnumber($accountnumber)
  220.     {
  221.         $this->accountnumber $accountnumber;
  222.         return $this;
  223.     }
  224.     /**
  225.      * Get accountnumber.
  226.      *
  227.      * @return string
  228.      */
  229.     public function getAccountnumber()
  230.     {
  231.         return $this->accountnumber;
  232.     }
  233.     /**
  234.      * Set documentowner.
  235.      *
  236.      * @param string $documentowner
  237.      *
  238.      * @return Agent
  239.      */
  240.     public function setDocumentowner($documentowner)
  241.     {
  242.         $this->documentowner $documentowner;
  243.         return $this;
  244.     }
  245.     /**
  246.      * Get documentowner.
  247.      *
  248.      * @return string
  249.      */
  250.     public function getDocumentowner()
  251.     {
  252.         return $this->documentowner;
  253.     }
  254.     /**
  255.      * Set rntfilename.
  256.      *
  257.      * @param string $rntfilename
  258.      *
  259.      * @return Agent
  260.      */
  261.     public function setRntfilename($rntfilename)
  262.     {
  263.         $this->rntfilename $rntfilename;
  264.         return $this;
  265.     }
  266.     /**
  267.      * Get rntfilename.
  268.      *
  269.      * @return string
  270.      */
  271.     public function getRntfilename()
  272.     {
  273.         return $this->rntfilename;
  274.     }
  275.     /**
  276.      * Set aditionalfilename.
  277.      *
  278.      * @param string $aditionalfilename
  279.      *
  280.      * @return Agent
  281.      */
  282.     public function setAditionalfilename($aditionalfilename)
  283.     {
  284.         $this->aditionalfilename $aditionalfilename;
  285.         return $this;
  286.     }
  287.     /**
  288.      * Get aditionalfilename.
  289.      *
  290.      * @return string
  291.      */
  292.     public function getAditionalfilename()
  293.     {
  294.         return $this->aditionalfilename;
  295.     }
  296.     /**
  297.      * Set certifiedccfilename.
  298.      *
  299.      * @param string $certifiedccfilename
  300.      *
  301.      * @return Agent
  302.      */
  303.     public function setCertifiedccfilename($certifiedccfilename)
  304.     {
  305.         $this->certifiedccfilename $certifiedccfilename;
  306.         return $this;
  307.     }
  308.     /**
  309.      * Get certifiedccfilename.
  310.      *
  311.      * @return string
  312.      */
  313.     public function getCertifiedccfilename()
  314.     {
  315.         return $this->certifiedccfilename;
  316.     }
  317.     /**
  318.      * Set ownerlegalname.
  319.      *
  320.      * @param string $ownerlegalname
  321.      *
  322.      * @return Agent
  323.      */
  324.     public function setOwnerlegalname($ownerlegalname)
  325.     {
  326.         $this->ownerlegalname $ownerlegalname;
  327.         return $this;
  328.     }
  329.     /**
  330.      * Get ownerlegalname.
  331.      *
  332.      * @return string
  333.      */
  334.     public function getOwnerlegalname()
  335.     {
  336.         return $this->ownerlegalname;
  337.     }
  338.     /**
  339.      * Set accountownername.
  340.      *
  341.      * @param string $accountownername
  342.      *
  343.      * @return Agent
  344.      */
  345.     public function setAccountownername($accountownername)
  346.     {
  347.         $this->accountownername $accountownername;
  348.         return $this;
  349.     }
  350.     /**
  351.      * Get accountownername.
  352.      *
  353.      * @return string
  354.      */
  355.     public function getAccountownername()
  356.     {
  357.         return $this->accountownername;
  358.     }
  359.     /**
  360.      * Set bankname.
  361.      *
  362.      * @param string $bankname
  363.      *
  364.      * @return Agent
  365.      */
  366.     public function setBankname($bankname)
  367.     {
  368.         $this->bankname $bankname;
  369.         return $this;
  370.     }
  371.     /**
  372.      * Get bankname.
  373.      *
  374.      * @return string
  375.      */
  376.     public function getBankname()
  377.     {
  378.         return $this->bankname;
  379.     }
  380.     /**
  381.      * Set website.
  382.      *
  383.      * @param string $website
  384.      *
  385.      * @return Agent
  386.      */
  387.     public function setWebsite($website)
  388.     {
  389.         $this->website $website;
  390.         return $this;
  391.     }
  392.     /**
  393.      * Get website.
  394.      *
  395.      * @return string
  396.      */
  397.     public function getWebsite()
  398.     {
  399.         return $this->website;
  400.     }
  401.     /**
  402.      * Set iata.
  403.      *
  404.      * @param int $iata
  405.      *
  406.      * @return Agent
  407.      */
  408.     public function setIata($iata)
  409.     {
  410.         $this->iata $iata;
  411.         return $this;
  412.     }
  413.     /**
  414.      * Get iata.
  415.      *
  416.      * @return int
  417.      */
  418.     public function getIata()
  419.     {
  420.         return $this->iata;
  421.     }
  422.     /**
  423.      * Set agency.
  424.      *
  425.      * @param \Aviatur\AgencyBundle\Entity\Agency $agency
  426.      *
  427.      * @return Agency
  428.      */
  429.     public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency null)
  430.     {
  431.         $this->agency $agency;
  432.         return $this;
  433.     }
  434.     /**
  435.      * Get agency.
  436.      *
  437.      * @return \Aviatur\AgencyBundle\Entity\Agency
  438.      */
  439.     public function getAgency()
  440.     {
  441.         return $this->agency;
  442.     }
  443.     /**
  444.      * Set creationdate.
  445.      *
  446.      * @param \DateTime $creationdate
  447.      *
  448.      * @return Agent
  449.      */
  450.     public function setCreationdate($creationdate)
  451.     {
  452.         $this->creationdate $creationdate;
  453.         return $this;
  454.     }
  455.     /**
  456.      * Get creationdate.
  457.      *
  458.      * @return \DateTime
  459.      */
  460.     public function getCreationdate()
  461.     {
  462.         return $this->creationdate;
  463.     }
  464.     /**
  465.      * Set updatedate.
  466.      *
  467.      * @param \DateTime $updatedate
  468.      *
  469.      * @return Agent
  470.      */
  471.     public function setUpdatedate($updatedate)
  472.     {
  473.         $this->updatedate $updatedate;
  474.         return $this;
  475.     }
  476.     /**
  477.      * Get updatedate.
  478.      *
  479.      * @return \DateTime
  480.      */
  481.     public function getUpdatedate()
  482.     {
  483.         return $this->updatedate;
  484.     }
  485.     /**
  486.      * Set activationdate.
  487.      *
  488.      * @param \DateTime $activationdate
  489.      *
  490.      * @return Agent
  491.      */
  492.     public function setActivationdate($activationdate)
  493.     {
  494.         $this->activationdate $activationdate;
  495.         return $this;
  496.     }
  497.     /**
  498.      * Get activationdate.
  499.      *
  500.      * @return \DateTime
  501.      */
  502.     public function getActivationdate()
  503.     {
  504.         return $this->activationdate;
  505.     }
  506.     /**
  507.      * Set isactive.
  508.      *
  509.      * @param bool $isactive
  510.      *
  511.      * @return Agent
  512.      */
  513.     public function setIsactive($isactive)
  514.     {
  515.         $this->isactive $isactive;
  516.         return $this;
  517.     }
  518.     /**
  519.      * Get isactive.
  520.      *
  521.      * @return bool
  522.      */
  523.     public function getIsactive()
  524.     {
  525.         return $this->isactive;
  526.     }
  527.     /**
  528.      * Set isauthorized.
  529.      *
  530.      * @param bool $isauthorized
  531.      *
  532.      * @return Agent
  533.      */
  534.     public function setIsauthorized($isauthorized)
  535.     {
  536.         $this->isauthorized $isauthorized;
  537.         return $this;
  538.     }
  539.     /**
  540.      * Get isauthorized.
  541.      *
  542.      * @return bool
  543.      */
  544.     public function getIsauthorized()
  545.     {
  546.         return $this->isauthorized;
  547.     }
  548.     /**
  549.      * Set customer.
  550.      *
  551.      * @param \Aviatur\CustomerBundle\Entity\Customer $customer
  552.      *
  553.      * @return Agent
  554.      */
  555.     public function setCustomer(\Aviatur\CustomerBundle\Entity\Customer $customer null)
  556.     {
  557.         $this->customer $customer;
  558.         return $this;
  559.     }
  560.     /**
  561.      * Get customer.
  562.      *
  563.      * @return \Aviatur\CustomerBundle\Entity\Customer
  564.      */
  565.     public function getCustomer()
  566.     {
  567.         return $this->customer;
  568.     }
  569.     /**
  570.      * Add agentTransaction.
  571.      *
  572.      * @return Agent
  573.      */
  574.     public function addAgentTransaction(\Aviatur\AgentBundle\Entity\AgentTransaction $agentTransaction)
  575.     {
  576.         $this->agentTransaction[] = $agentTransaction;
  577.         return $this;
  578.     }
  579.     /**
  580.      * Remove agentTransaction.
  581.      */
  582.     public function removeAgentTransaction(\Aviatur\AgentBundle\Entity\AgentTransaction $agentTransaction)
  583.     {
  584.         $this->agentTransaction->removeElement($agentTransaction);
  585.     }
  586.     /**
  587.      * Get agentTransaction.
  588.      *
  589.      * @return \Doctrine\Common\Collections\Collection
  590.      */
  591.     public function getAgentTransaction()
  592.     {
  593.         return $this->agentTransaction;
  594.     }
  595.     /**
  596.      * Add agentCommission.
  597.      *
  598.      * @return Agent
  599.      */
  600.     public function addAgentCommission(\Aviatur\AgentBundle\Entity\AgentCommission $agentCommission)
  601.     {
  602.         $this->agentCommission[] = $agentCommission;
  603.         return $this;
  604.     }
  605.     /**
  606.      * Remove agentCommission.
  607.      */
  608.     public function removeAgentCommission(\Aviatur\AgentBundle\Entity\AgentCommission $agentCommission)
  609.     {
  610.         $this->agentTransaction->removeElement($agentCommission);
  611.     }
  612.     /**
  613.      * Get agentCommission.
  614.      *
  615.      * @return \Doctrine\Common\Collections\Collection
  616.      */
  617.     public function getAgentCommission()
  618.     {
  619.         return $this->agentCommission;
  620.     }
  621.     /**
  622.      * Set parentAgent.
  623.      *
  624.      * @param string $parentAgent
  625.      *
  626.      * @return Agent
  627.      */
  628.     public function setParentagent($parentAgent)
  629.     {
  630.         $this->parentAgent $parentAgent;
  631.         return $this;
  632.     }
  633.     /**
  634.      * Get parentAgent.
  635.      *
  636.      * @return string
  637.      */
  638.     public function getParentagent()
  639.     {
  640.         return $this->parentAgent;
  641.     }
  642. }