src/Entity/Order.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass="App\EntityRepo\OrderRepo")
  9.  * @ORM\Table(name="eshop_order")
  10.  */
  11. class Order
  12. {
  13.     /**
  14.      * @ORM\Column(type="integer")
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */ 
  18.     protected $orderId=0;
  19.     
  20.     /**
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     protected $eshopId=0;    
  24.  
  25.     /**
  26.      * @ORM\Column(type="integer")
  27.      */
  28.     protected $contactId=0;    
  29.     
  30.     /**
  31.      * @ORM\Column(type="string", length=100, nullable=true)
  32.      */
  33.     protected $status='new';    
  34.     
  35.     /**
  36.      * @ORM\Column(type="string", length=22)
  37.      */
  38.     protected $ip;    
  39.     
  40.     /**
  41.      * @ORM\Column(type="datetime", nullable=true)
  42.      */
  43.     protected $dateCreated;    
  44.     /**
  45.      * @ORM\Column(type="datetime", nullable=true)
  46.      */
  47.     protected $dateConfirmed;
  48.     
  49.     /**
  50.      * @ORM\Column(type="integer")
  51.      */
  52.     protected $paymentId=0;    
  53.     
  54.     /**
  55.      * @ORM\Column(type="integer")
  56.      */
  57.     protected $deliveryId=0
  58.     
  59.     /**
  60.      * Many Orders have Many OrderItems.
  61.      * @ORM\ManyToMany(targetEntity="OrderItem")
  62.      * @ORM\JoinTable(name="order_orderitem",
  63.      *      joinColumns={@ORM\JoinColumn(name="order_id", referencedColumnName="order_id")},
  64.      *      inverseJoinColumns={@ORM\JoinColumn(name="order_item_id", referencedColumnName="order_item_id", unique=false)}
  65.      *      )
  66.      */
  67.     protected $orderItems;  
  68.     /**
  69.      * @ORM\Column(type="integer", nullable=true)
  70.      */
  71.     protected $eshopDeliveryId
  72.     /**
  73.      * @ORM\ManyToOne(targetEntity="EshopDelivery")   
  74.      * @ORM\JoinColumn(name="eshop_delivery_id", referencedColumnName="eshop_delivery_id")
  75.      */
  76.     protected $eshopDelivery;
  77.     /**
  78.      * @ORM\Column(type="integer", nullable=true)
  79.      */
  80.     protected $eshopPaymentId
  81.     /**
  82.      * @ORM\ManyToOne(targetEntity="EshopPayment",cascade={"persist"})   
  83.      * @ORM\JoinColumn(name="eshop_payment_id", referencedColumnName="eshop_payment_id")
  84.      */
  85.     protected $eshopPayment;
  86.     /**
  87.      * @ORM\Column(type="integer")
  88.      */
  89.     protected $eshopContactId
  90.     /**
  91.      * @ORM\ManyToOne(targetEntity="Contact")   
  92.      * @ORM\JoinColumn(name="eshop_contact_id", referencedColumnName="contact_id")
  93.      */
  94.     protected $eshopContact;
  95.     /**
  96.      * @ORM\Column(type="string", length=100, nullable=true)
  97.      */
  98.     protected $paymentStatus=''
  99.     /**
  100.      * @ORM\Column(type="string", length=3, nullable=true)
  101.      */
  102.     protected $currencyKey='';             
  103.     /**
  104.      * Get orderId
  105.      *
  106.      * @return integer
  107.      */
  108.     public function getOrderId()
  109.     {
  110.         return $this->orderId;
  111.     }
  112.     /**
  113.      * Set eshopId
  114.      *
  115.      * @param integer $eshopId
  116.      *
  117.      * @return Order
  118.      */
  119.     public function setEshopId($eshopId)
  120.     {
  121.         $this->eshopId $eshopId;
  122.         return $this;
  123.     }
  124.     /**
  125.      * Get eshopId
  126.      *
  127.      * @return integer
  128.      */
  129.     public function getEshopId()
  130.     {
  131.         return $this->eshopId;
  132.     }
  133.     /**
  134.      * Set contactId
  135.      *
  136.      * @param integer $contactId
  137.      *
  138.      * @return Order
  139.      */
  140.     public function setContactId($contactId)
  141.     {
  142.         $this->contactId $contactId;
  143.         return $this;
  144.     }
  145.     /**
  146.      * Get contactId
  147.      *
  148.      * @return integer
  149.      */
  150.     public function getContactId()
  151.     {
  152.         return $this->contactId;
  153.     }
  154.     /**
  155.      * Set status
  156.      *
  157.      * @param string $status
  158.      *
  159.      * @return Order
  160.      */
  161.     public function setStatus($status)
  162.     {
  163.         $this->status $status;
  164.         return $this;
  165.     }
  166.     /**
  167.      * Get status
  168.      *
  169.      * @return string
  170.      */
  171.     public function getStatus()
  172.     {
  173.         return $this->status;
  174.     }
  175.     /**
  176.      * Set ip
  177.      *
  178.      * @param string $ip
  179.      *
  180.      * @return Order
  181.      */
  182.     public function setIp($ip)
  183.     {
  184.         $this->ip $ip;
  185.         return $this;
  186.     }
  187.     /**
  188.      * Get ip
  189.      *
  190.      * @return string
  191.      */
  192.     public function getIp()
  193.     {
  194.         return $this->ip;
  195.     }
  196.     /**
  197.      * Set dateCreated
  198.      *
  199.      * @param \DateTime $dateCreated
  200.      *
  201.      * @return Order
  202.      */
  203.     public function setDateCreated($dateCreated)
  204.     {
  205.         $this->dateCreated $dateCreated;
  206.         return $this;
  207.     }
  208.     /**
  209.      * Get dateCreated
  210.      *
  211.      * @return \DateTime
  212.      */
  213.     public function getDateCreated()
  214.     {
  215.         return $this->dateCreated;
  216.     }
  217.     /**
  218.      * Set dateConfirmed
  219.      *
  220.      * @param \DateTime $dateConfirmed
  221.      *
  222.      * @return Order
  223.      */
  224.     public function setDateConfirmed($dateConfirmed)
  225.     {
  226.         $this->dateConfirmed $dateConfirmed;
  227.         return $this;
  228.     }
  229.     /**
  230.      * Get dateConfirmed
  231.      *
  232.      * @return \DateTime
  233.      */
  234.     public function getDateConfirmed()
  235.     {
  236.         return $this->dateConfirmed;
  237.     }
  238.     /**
  239.      * Set paymentId
  240.      *
  241.      * @param integer $paymentId
  242.      *
  243.      * @return Order
  244.      */
  245.     public function setPaymentId($paymentId)
  246.     {
  247.         $this->paymentId $paymentId;
  248.         return $this;
  249.     }
  250.     /**
  251.      * Get paymentId
  252.      *
  253.      * @return integer
  254.      */
  255.     public function getPaymentId()
  256.     {
  257.         return $this->paymentId;
  258.     }
  259.     /**
  260.      * Set deliveryId
  261.      *
  262.      * @param integer $deliveryId
  263.      *
  264.      * @return Order
  265.      */
  266.     public function setDeliveryId($deliveryId)
  267.     {
  268.         $this->deliveryId $deliveryId;
  269.         return $this;
  270.     }
  271.     /**
  272.      * Get deliveryId
  273.      *
  274.      * @return integer
  275.      */
  276.     public function getDeliveryId()
  277.     {
  278.         return $this->deliveryId;
  279.     }
  280.     /**
  281.      * Constructor
  282.      */
  283.     public function __construct()
  284.     {
  285.         $this->orderItems = new \Doctrine\Common\Collections\ArrayCollection();
  286.     }
  287.     /**
  288.      * Add orderItem
  289.      *
  290.      * @param \App\Entity\OrderItem $orderItem
  291.      *
  292.      * @return Order
  293.      */
  294.     public function addOrderItem(\App\Entity\OrderItem $orderItem)
  295.     {
  296.         $this->orderItems[] = $orderItem;
  297.         return $this;
  298.     }
  299.     /**
  300.      * Remove orderItem
  301.      *
  302.      * @param \App\Entity\OrderItem $orderItem
  303.      */
  304.     public function removeOrderItem(\App\Entity\OrderItem $orderItem)
  305.     {
  306.         $this->orderItems->removeElement($orderItem);
  307.     }
  308.     /**
  309.      * Get orderItems
  310.      *
  311.      * @return \Doctrine\Common\Collections\Collection
  312.      */
  313.     public function getOrderItems()
  314.     {
  315.         return $this->orderItems;
  316.     }
  317.     /**
  318.      * Set eshopDeliveryId
  319.      *
  320.      * @param integer $eshopDeliveryId
  321.      *
  322.      * @return Order
  323.      */
  324.     public function setEshopDeliveryId($eshopDeliveryId)
  325.     {
  326.         $this->eshopDeliveryId $eshopDeliveryId;
  327.         return $this;
  328.     }
  329.     /**
  330.      * Get eshopDeliveryId
  331.      *
  332.      * @return integer
  333.      */
  334.     public function getEshopDeliveryId()
  335.     {
  336.         return $this->eshopDeliveryId;
  337.     }
  338.     /**
  339.      * Set eshopDelivery
  340.      *
  341.      * @param \App\Entity\EshopDelivery $eshopDelivery
  342.      *
  343.      * @return Order
  344.      */
  345.     public function setEshopDelivery(\App\Entity\EshopDelivery $eshopDelivery null)
  346.     {
  347.         $this->eshopDelivery $eshopDelivery;
  348.         return $this;
  349.     }
  350.     /**
  351.      * Get eshopDelivery
  352.      *
  353.      * @return \App\Entity\EshopDelivery
  354.      */
  355.     public function getEshopDelivery()
  356.     {
  357.         return $this->eshopDelivery;
  358.     }
  359.     /**
  360.      * Set eshopPaymentId
  361.      *
  362.      * @param integer $eshopPaymentId
  363.      *
  364.      * @return Order
  365.      */
  366.     public function setEshopPaymentId($eshopPaymentId)
  367.     {
  368.         $this->eshopPaymentId $eshopPaymentId;
  369.         return $this;
  370.     }
  371.     /**
  372.      * Get eshopPaymentId
  373.      *
  374.      * @return integer
  375.      */
  376.     public function getEshopPaymentId()
  377.     {
  378.         return $this->eshopPaymentId;
  379.     }
  380.     /**
  381.      * Set eshopPayment
  382.      *
  383.      * @param \App\Entity\EshopPayment $eshopPayment
  384.      *
  385.      * @return Order
  386.      */
  387.     public function setEshopPayment(\App\Entity\EshopPayment $eshopPayment null)
  388.     {
  389.         $this->eshopPayment $eshopPayment;
  390.         return $this;
  391.     }
  392.     /**
  393.      * Get eshopPayment
  394.      *
  395.      * @return \App\Entity\EshopPayment
  396.      */
  397.     public function getEshopPayment()
  398.     {
  399.         return $this->eshopPayment;
  400.     }
  401.     /**
  402.      * Set eshopContactId
  403.      *
  404.      * @param integer $eshopContactId
  405.      *
  406.      * @return Order
  407.      */
  408.     public function setEshopContactId($eshopContactId)
  409.     {
  410.         $this->eshopContactId $eshopContactId;
  411.         return $this;
  412.     }
  413.     /**
  414.      * Get eshopContactId
  415.      *
  416.      * @return integer
  417.      */
  418.     public function getEshopContactId()
  419.     {
  420.         return $this->eshopContactId;
  421.     }
  422.     /**
  423.      * Set eshopContact
  424.      *
  425.      * @param \App\Entity\Contact $eshopContact
  426.      *
  427.      * @return Order
  428.      */
  429.     public function setEshopContact(\App\Entity\Contact $eshopContact null)
  430.     {
  431.         $this->eshopContact $eshopContact;
  432.         return $this;
  433.     }
  434.     /**
  435.      * Get eshopContact
  436.      *
  437.      * @return \App\Entity\Contact
  438.      */
  439.     public function getEshopContact()
  440.     {
  441.         return $this->eshopContact;
  442.     }
  443.     /**
  444.      * Set paymentStatus
  445.      *
  446.      * @param string $paymentStatus
  447.      *
  448.      * @return Order
  449.      */
  450.     public function setPaymentStatus($paymentStatus)
  451.     {
  452.         $this->paymentStatus $paymentStatus;
  453.         return $this;
  454.     }
  455.     /**
  456.      * Get paymentStatus
  457.      *
  458.      * @return string
  459.      */
  460.     public function getPaymentStatus()
  461.     {
  462.         return $this->paymentStatus;
  463.     }
  464.     /**
  465.      * Set currencyKey
  466.      *
  467.      * @param string $currencyKey
  468.      *
  469.      * @return Order
  470.      */
  471.     public function setCurrencyKey($currencyKey)
  472.     {
  473.         $this->currencyKey $currencyKey;
  474.         return $this;
  475.     }
  476.     /**
  477.      * Get currencyKey
  478.      *
  479.      * @return string
  480.      */
  481.     public function getCurrencyKey()
  482.     {
  483.         return $this->currencyKey;
  484.     }
  485. }