src/OfficeBrain/Bundle/OrderBundle/Entity/OrderProduct.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\OfficeBrain\Bundle\OrderBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. /**
  6.  * OrderProduct
  7.  *
  8.  * @ORM\Table(name="tbl_order_product", options={"type"="InnoDB","charset"="utf8","collate"="utf8_unicode_ci"})
  9.  * @ORM\Entity(repositoryClass="App\OfficeBrain\Bundle\OrderBundle\Entity\OrderProductRepository")
  10.  */
  11. class OrderProduct
  12. {
  13.     /**
  14.      * @var integer
  15.      *
  16.      * @ORM\Column(name="id",type="bigint", length=20 , options={"unsigned"=true})
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="OrderItemLine", inversedBy="orderProduct")
  23.      * @ORM\JoinColumn(name="order_item_line_id", referencedColumnName="id")
  24.      */
  25.     private $orderItemLineId;
  26.     /**
  27.      * @var integer
  28.      *
  29.      * @ORM\Column(name="order_master_id", type="bigint", length=20, nullable=true, options={"unsigned"=true})
  30.      */
  31.     private $orderId;
  32.     /**
  33.      * @var integer
  34.      *
  35.      * @ORM\Column(name="product_id", type="bigint", length=20, nullable=true, options={"unsigned"=true})
  36.      */
  37.     private $productId;
  38.     /**
  39.      * @var integer
  40.      *
  41.      * @ORM\Column(name="culture_product_id", type="bigint", length=20, nullable=true, options={"unsigned"=true})
  42.      */
  43.     private $cultureProductId;
  44.     
  45.     /**
  46.      * @ORM\OneToMany(targetEntity="OrderVariationMaster", mappedBy="orderProductId")
  47.      */
  48.     private $orderVariationMaster;
  49.     
  50.     /**
  51.      * @ORM\OneToOne(targetEntity="OrderShippingDetail", mappedBy="orderProductId")
  52.      */
  53.     private $orderShippingDetail;
  54.     
  55.     public function __construct() {
  56.         $this->orderVariationMaster = new ArrayCollection();
  57.     }
  58.     /**
  59.      * Get id
  60.      *
  61.      * @return integer 
  62.      */
  63.     public function getId()
  64.     {
  65.         return $this->id;
  66.     }
  67.     /**
  68.      * Set orderId
  69.      *
  70.      * @param integer $orderId
  71.      * @return OrderProduct
  72.      */
  73.     public function setOrderId($orderId)
  74.     {
  75.         $this->orderId $orderId;
  76.         return $this;
  77.     }
  78.     /**
  79.      * Get orderId
  80.      *
  81.      * @return integer 
  82.      */
  83.     public function getOrderId()
  84.     {
  85.         return $this->orderId;
  86.     }
  87.     /**
  88.      * Set productId
  89.      *
  90.      * @param integer $productId
  91.      * @return OrderProduct
  92.      */
  93.     public function setProductId($productId)
  94.     {
  95.         $this->productId $productId;
  96.         return $this;
  97.     }
  98.     /**
  99.      * Get productId
  100.      *
  101.      * @return integer 
  102.      */
  103.     public function getProductId()
  104.     {
  105.         return $this->productId;
  106.     }
  107.     /**
  108.      * Set cultureProductId
  109.      *
  110.      * @param integer $cultureProductId
  111.      * @return OrderProduct
  112.      */
  113.     public function setCultureProductId($cultureProductId)
  114.     {
  115.         $this->cultureProductId $cultureProductId;
  116.         return $this;
  117.     }
  118.     /**
  119.      * Get cultureProductId
  120.      *
  121.      * @return integer 
  122.      */
  123.     public function getCultureProductId()
  124.     {
  125.         return $this->cultureProductId;
  126.     }
  127.     /**
  128.      * Set orderItemLineId
  129.      *
  130.      * @param \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderItemLine $orderItemLineId
  131.      * @return OrderProduct
  132.      */
  133.     public function setOrderItemLineId(\App\OfficeBrain\Bundle\OrderBundle\Entity\OrderItemLine $orderItemLineId null)
  134.     {
  135.         $this->orderItemLineId $orderItemLineId;
  136.         return $this;
  137.     }
  138.     /**
  139.      * Get orderItemLineId
  140.      *
  141.      * @return \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderItemLine 
  142.      */
  143.     public function getOrderItemLineId()
  144.     {
  145.         return $this->orderItemLineId;
  146.     }
  147.     /**
  148.      * Add orderVariationMaster
  149.      *
  150.      * @param \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderVariationMaster $orderVariationMaster
  151.      * @return OrderProduct
  152.      */
  153.     public function addOrderVariationMaster(\App\OfficeBrain\Bundle\OrderBundle\Entity\OrderVariationMaster $orderVariationMaster)
  154.     {
  155.         $this->orderVariationMaster[] = $orderVariationMaster;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Remove orderVariationMaster
  160.      *
  161.      * @param \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderVariationMaster $orderVariationMaster
  162.      */
  163.     public function removeOrderVariationMaster(\App\OfficeBrain\Bundle\OrderBundle\Entity\OrderVariationMaster $orderVariationMaster)
  164.     {
  165.         $this->orderVariationMaster->removeElement($orderVariationMaster);
  166.     }
  167.     /**
  168.      * Get orderVariationMaster
  169.      *
  170.      * @return \Doctrine\Common\Collections\Collection 
  171.      */
  172.     public function getOrderVariationMaster()
  173.     {
  174.         return $this->orderVariationMaster;
  175.     }
  176.     /**
  177.      * Set orderShippingDetail
  178.      *
  179.      * @param \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderShippingDetail $orderShippingDetail
  180.      * @return OrderProduct
  181.      */
  182.     public function setOrderShippingDetail(\App\OfficeBrain\Bundle\OrderBundle\Entity\OrderShippingDetail $orderShippingDetail null)
  183.     {
  184.         $this->orderShippingDetail $orderShippingDetail;
  185.         return $this;
  186.     }
  187.     /**
  188.      * Get orderShippingDetail
  189.      *
  190.      * @return \App\OfficeBrain\Bundle\OrderBundle\Entity\OrderShippingDetail 
  191.      */
  192.     public function getOrderShippingDetail()
  193.     {
  194.         return $this->orderShippingDetail;
  195.     }
  196. }