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

Open in your IDE?
  1. <?php
  2. namespace Aviatur\GeneralBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * Order.
  6.  *
  7.  * @ORM\Table(name="orders", indexes={@ORM\Index(name="IDX_34E8BC9CCDEADB2A", columns={"agency_id"}), @ORM\Index(name="IDX_34E8BC9C9395C3F3", columns={"customer_id"})})
  8.  * @ORM\Entity(repositoryClass="Aviatur\GeneralBundle\Entity\OrderRepository")
  9.  */
  10. class Order
  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="orderIdAviatur", type="string", length=255, nullable=true)
  24.      */
  25.     private $orderidaviatur;
  26.     /**
  27.      * @var \DateTime
  28.      *
  29.      * @ORM\Column(name="creationDate", type="datetime", nullable=false)
  30.      */
  31.     private $creationdate;
  32.     /**
  33.      * @var \DateTime
  34.      *
  35.      * @ORM\Column(name="updatingDate", type="datetime", nullable=false)
  36.      */
  37.     private $updatingdate;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="status", type="string", nullable=false)
  42.      */
  43.     private $status;
  44.     /**
  45.      *
  46.      * @ORM\ManyToOne(targetEntity="Aviatur\CustomerBundle\Entity\Customer", inversedBy="order")
  47.      * @ORM\JoinColumns({
  48.      *   @ORM\JoinColumn(name="customer_id", referencedColumnName="id")
  49.      * })
  50.      */
  51.     private ?\Aviatur\CustomerBundle\Entity\Customer $customer null;
  52.     /**
  53.      * @var int
  54.      *
  55.      * @ORM\Column(name="customerFront", type="integer", length=11, nullable=true)
  56.      */
  57.     private $customerfront;
  58.     /**
  59.      * @var \Agency
  60.      *
  61.      * @ORM\ManyToOne(targetEntity="Aviatur\AgencyBundle\Entity\Agency", inversedBy="order")
  62.      * @ORM\JoinColumns({
  63.      *   @ORM\JoinColumn(name="agency_id", referencedColumnName="id")
  64.      * })
  65.      */
  66.     private $agency;
  67.     /**
  68.      * @var string
  69.      *
  70.      * @ORM\Column(name="agencyFront", type="string", length=50, nullable=true)
  71.      */
  72.     private $agencyfront;
  73.     /**
  74.      * @var \Agent
  75.      *
  76.      * @ORM\ManyToOne(targetEntity="Aviatur\AgentBundle\Entity\Agent", inversedBy="order")
  77.      * @ORM\JoinColumns({
  78.      *   @ORM\JoinColumn(name="agent_id", referencedColumnName="id")
  79.      * })
  80.      */
  81.     private $agent;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\Churning", mappedBy="order", cascade={"all"})
  84.      */
  85.     private $churning;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\OrderProduct", mappedBy="order", cascade={"all"})
  88.      */
  89.     private $orderProduct;
  90.     /**
  91.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\FormUserInfo", mappedBy="order", cascade={"all"})
  92.      */
  93.     private $formUserInfo;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity="Aviatur\GeneralBundle\Entity\AncillariesOrder", mappedBy="order", cascade={"all"})
  96.      */
  97.     private $ancillariesOrder;
  98.     /**
  99.      * @ORM\OneToMany(targetEntity="Aviatur\FlightBundle\Entity\ChurningActivityLog", mappedBy="order", cascade={"all"})
  100.      */
  101.     private $churningActivityLog;
  102.     /**
  103.      * Constructor.
  104.      */
  105.     public function __construct()
  106.     {
  107.         $this->formUserInfo = new \Doctrine\Common\Collections\ArrayCollection();
  108.         $this->orderProduct = new \Doctrine\Common\Collections\ArrayCollection();
  109.         $this->churning = new \Doctrine\Common\Collections\ArrayCollection();
  110.         $this->ancillariesOrder = new \Doctrine\Common\Collections\ArrayCollection();
  111.         $this->churningActivityLog = new \Doctrine\Common\Collections\ArrayCollection();
  112.     }
  113.     /**
  114.      * __toString.
  115.      */
  116.     public function __toString()
  117.     {
  118.         $return = (string) 'ON'.$this->getId();
  119.         return $return;
  120.     }
  121.     /**
  122.      * Get id.
  123.      *
  124.      * @return int
  125.      */
  126.     public function getId()
  127.     {
  128.         return $this->id;
  129.     }
  130.     /**
  131.      * Set orderidaviatur.
  132.      *
  133.      * @param string $orderidaviatur
  134.      *
  135.      * @return Order
  136.      */
  137.     public function setOrderidaviatur($orderidaviatur)
  138.     {
  139.         $this->orderidaviatur $orderidaviatur;
  140.         return $this;
  141.     }
  142.     /**
  143.      * Get orderidaviatur.
  144.      *
  145.      * @return string
  146.      */
  147.     public function getOrderidaviatur()
  148.     {
  149.         return $this->orderidaviatur;
  150.     }
  151.     /**
  152.      * Set creationdate.
  153.      *
  154.      * @param \DateTime $creationdate
  155.      *
  156.      * @return Order
  157.      */
  158.     public function setCreationdate($creationdate)
  159.     {
  160.         $this->creationdate $creationdate;
  161.         return $this;
  162.     }
  163.     /**
  164.      * Get creationdate.
  165.      *
  166.      * @return \DateTime
  167.      */
  168.     public function getCreationdate()
  169.     {
  170.         return $this->creationdate;
  171.     }
  172.     /**
  173.      * Set updatingdate.
  174.      *
  175.      * @param \DateTime $updatingdate
  176.      *
  177.      * @return Order
  178.      */
  179.     public function setUpdatingdate($updatingdate)
  180.     {
  181.         $this->updatingdate $updatingdate;
  182.         return $this;
  183.     }
  184.     /**
  185.      * Get updatingdate.
  186.      *
  187.      * @return \DateTime
  188.      */
  189.     public function getUpdatingdate()
  190.     {
  191.         return $this->updatingdate;
  192.     }
  193.     /**
  194.      * Set status.
  195.      *
  196.      * @param string $status
  197.      *
  198.      * @return Order
  199.      */
  200.     public function setStatus($status)
  201.     {
  202.         $this->status $status;
  203.         return $this;
  204.     }
  205.     /**
  206.      * Get status.
  207.      *
  208.      * @return string
  209.      */
  210.     public function getStatus()
  211.     {
  212.         return $this->status;
  213.     }
  214.     /**
  215.      * Set customer.
  216.      *
  217.      * @param \Aviatur\CustomerBundle\Entity\Customer $customer
  218.      *
  219.      * @return Order
  220.      */
  221.     public function setCustomer(\Aviatur\CustomerBundle\Entity\Customer $customer null)
  222.     {
  223.         $this->customer $customer;
  224.         return $this;
  225.     }
  226.     /**
  227.      * Get customer.
  228.      *
  229.      * @return \Aviatur\CustomerBundle\Entity\Customer
  230.      */
  231.     public function getCustomer()
  232.     {
  233.         return $this->customer;
  234.     }
  235.     /**
  236.      * Set customerfront.
  237.      *
  238.      * @param int $customerfront
  239.      *
  240.      * @return Order
  241.      */
  242.     public function setCustomerfront($customerfront)
  243.     {
  244.         $this->customerfront $customerfront;
  245.         return $this;
  246.     }
  247.     /**
  248.      * Get customerfront.
  249.      *
  250.      * @return int
  251.      */
  252.     public function getCustomerfront()
  253.     {
  254.         return $this->customerfront;
  255.     }
  256.     /**
  257.      * Set agency.
  258.      *
  259.      * @param \Aviatur\AgencyBundle\Entity\Agency $agency
  260.      *
  261.      * @return Order
  262.      */
  263.     public function setAgency(\Aviatur\AgencyBundle\Entity\Agency $agency null)
  264.     {
  265.         $this->agency $agency;
  266.         return $this;
  267.     }
  268.     /**
  269.      * Get agency.
  270.      *
  271.      * @return \Aviatur\AgencyBundle\Entity\Agency
  272.      */
  273.     public function getAgency()
  274.     {
  275.         return $this->agency;
  276.     }
  277.     /**
  278.      * Set agencyfront.
  279.      *
  280.      * @param string $agencyfront
  281.      *
  282.      * @return Order
  283.      */
  284.     public function setAgencyfront($agencyfront)
  285.     {
  286.         $this->agencyfront $agencyfront;
  287.         return $this;
  288.     }
  289.     /**
  290.      * Get agencyfront.
  291.      *
  292.      * @return string
  293.      */
  294.     public function getAgencyfront()
  295.     {
  296.         return $this->agencyfront;
  297.     }
  298.     /**
  299.      * Set agent.
  300.      *
  301.      * @param \Aviatur\AgentBundle\Entity\Agent $agent
  302.      *
  303.      * @return Order
  304.      */
  305.     public function setAgent(\Aviatur\AgentBundle\Entity\Agent $agent null) {
  306.         $this->agent $agent;
  307.         return $this;
  308.     }
  309.     /**
  310.      * Get agent.
  311.      *
  312.      * @return \Aviatur\AgentBundle\Entity\Agent
  313.      */
  314.     public function getAgent()
  315.     {
  316.         return $this->agent;
  317.     }
  318.     /**
  319.      * Add orderProduct.
  320.      *
  321.      * @return Order
  322.      */
  323.     public function addOrderProduct(\Aviatur\GeneralBundle\Entity\OrderProduct $orderProduct)
  324.     {
  325.         $this->orderProduct[] = $orderProduct;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Remove orderProduct.
  330.      */
  331.     public function removeOrderProduct(\Aviatur\GeneralBundle\Entity\OrderProduct $orderProduct)
  332.     {
  333.         $this->orderProduct->removeElement($orderProduct);
  334.     }
  335.     /**
  336.      * Get orderProduct.
  337.      *
  338.      * @return \Doctrine\Common\Collections\Collection
  339.      */
  340.     public function getOrderProduct()
  341.     {
  342.         return $this->orderProduct;
  343.     }
  344.     /**
  345.      * Add formUserInfo.
  346.      *
  347.      * @return Order
  348.      */
  349.     public function addFormUserInfo(\Aviatur\GeneralBundle\Entity\FormUserInfo $formUserInfo)
  350.     {
  351.         $this->formUserInfo[] = $formUserInfo;
  352.         return $this;
  353.     }
  354.     /**
  355.      * Remove formUserInfo.
  356.      */
  357.     public function removeFormUserInfo(\Aviatur\GeneralBundle\Entity\FormUserInfo $formUserInfo)
  358.     {
  359.         $this->formUserInfo->removeElement($formUserInfo);
  360.     }
  361.     /**
  362.      * Get formUserInfo.
  363.      *
  364.      * @return \Doctrine\Common\Collections\Collection
  365.      */
  366.     public function getFormUserInfo()
  367.     {
  368.         return $this->formUserInfo;
  369.     }
  370.     /**
  371.      * Add churning.
  372.      *
  373.      * @return Agency
  374.      */
  375.     public function addChurning(\Aviatur\FlightBundle\Entity\Churning $churning)
  376.     {
  377.         $this->churning[] = $churning;
  378.         return $this;
  379.     }
  380.     /**
  381.      * Remove churning.
  382.      */
  383.     public function removeChurning(\Aviatur\FlightBundle\Entity\Churning $churning)
  384.     {
  385.         $this->churning->removeElement($churning);
  386.     }
  387.     /**
  388.      * Get churning.
  389.      *
  390.      * @return \Doctrine\Common\Collections\Collection
  391.      */
  392.     public function getChurning()
  393.     {
  394.         return $this->churning;
  395.     }
  396.     /**
  397.      * Add ancillariesOrder.
  398.      *
  399.      * @return AncillariesOrder
  400.      */
  401.     public function addAncillariesOrder(\Aviatur\GeneralBundle\Entity\AncillariesOrder $ancillariesOrder)
  402.     {
  403.         $this->ancillariesOrder[] = $ancillariesOrder;
  404.         return $this;
  405.     }
  406.     /**
  407.      * Remove ancillariesOrder.
  408.      */
  409.     public function removeAncillariesOrder(\Aviatur\GeneralBundle\Entity\AncillariesOrder $ancillariesOrder)
  410.     {
  411.         $this->ancillariesOrder->removeElement($ancillariesOrder);
  412.     }
  413.     /**
  414.      * Get ancillariesOrder.
  415.      *
  416.      * @return \Doctrine\Common\Collections\Collection
  417.      */
  418.     public function getAncillariesOrder()
  419.     {
  420.         return $this->ancillariesOrder;
  421.     }
  422.     /**
  423.      * Add churningActivityLog.
  424.      *
  425.      * @return ChurningActivityLog
  426.      */
  427.     public function addChurningActivityLog(\Aviatur\FlightBundle\Entity\ChurningActivityLog $churningActivityLog)
  428.     {
  429.         $this->churningActivityLog[] = $churningActivityLog;
  430.         return $this;
  431.     }
  432.     /**
  433.      * Remove ChurningActivityLog.
  434.      */
  435.     public function removeChurningActivityLog(\Aviatur\FlightBundle\Entity\ChurningActivityLog $churningActivityLog)
  436.     {
  437.         $this->churningActivityLog->removeElement($churningActivityLog);
  438.     }
  439.     /**
  440.      * Get ChurningActivityLog.
  441.      *
  442.      * @return \Doctrine\Common\Collections\Collection
  443.      */
  444.     public function getChurningActivityLog()
  445.     {
  446.         return $this->churningActivityLog;
  447.     }
  448. }