<?php

namespace OfficeBrain\Bundle\QuoteBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Doctrine\Common\Collections\ArrayCollection;
use JMS\Serializer\Annotation\ExclusionPolicy;
use JMS\Serializer\Annotation\Exclude;

/**
 * QuoteProduct
 *
 * @ORM\Table("tbl_quote_product", options={"type"="InnoDB","charset"="utf8","collate"="utf8_unicode_ci"})
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\QuoteBundle\Entity\QuoteProductRepository")
 */
class QuoteProduct
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id",type="bigint",length=20 ,options={"unsigned"=true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     * @Exclude
     * @ORM\ManyToOne(targetEntity="QuoteItemLine", inversedBy="quoteProduct")  
     * @ORM\JoinColumn(name="quote_item_line_id",referencedColumnName="id")
     */
    private $quoteItemLineId;

    /**
     * @var integer
     * @Exclude
     * @ORM\Column(name="quote_master_id", type="bigint",length=20 ,options={"unsigned"=true})
     */
    private $quoteMasterId;

    /**
     * @var integer
     *
     * @ORM\Column(name="product_id", type="bigint",length=20 ,options={"unsigned"=true})
     */
    private $productId;

    /**
     * @var integer
     *
     * @ORM\Column(name="culture_product_id", type="bigint",length=20 ,options={"unsigned"=true})
     */
    private $cultureProductId;

    /**
     * @ORM\OneToOne(targetEntity="QuoteShippingDetail", mappedBy="quoteProductId" ,cascade={"remove"})
     */
    private $quoteShippingDetail;
    
    /**
     * @ORM\OneToMany(targetEntity="QuoteVariationMaster", mappedBy="quoteProductId" ,cascade={"remove"})
     */
    private $quoteVariationMaster;
    
    
    public function __construct() {
    	
    	$this ->quoteVariationMaster = new ArrayCollection();
    }
    
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set quoteItemLineId
     *
     * @param integer $quoteItemLineId
     * @return QuoteProduct
     */
    public function setQuoteItemLineId($quoteItemLineId)
    {
        $this->quoteItemLineId = $quoteItemLineId;

        return $this;
    }

    /**
     * Get quoteItemLineId
     *
     * @return integer 
     */
    public function getQuoteItemLineId()
    {
        return $this->quoteItemLineId;
    }

    /**
     * Set quoteMasterId
     *
     * @param integer $quoteMasterId
     * @return QuoteProduct
     */
    public function setQuoteMasterId($quoteMasterId)
    {
        $this->quoteMasterId = $quoteMasterId;

        return $this;
    }

    /**
     * Get quoteMasterId
     *
     * @return integer 
     */
    public function getQuoteMasterId()
    {
        return $this->quoteMasterId;
    }

    /**
     * Set productId
     *
     * @param integer $productId
     * @return QuoteProduct
     */
    public function setProductId($productId)
    {
        $this->productId = $productId;

        return $this;
    }

    /**
     * Get productId
     *
     * @return integer 
     */
    public function getProductId()
    {
        return $this->productId;
    }

    /**
     * Set cultureProductId
     *
     * @param integer $cultureProductId
     * @return QuoteProduct
     */
    public function setCultureProductId($cultureProductId)
    {
        $this->cultureProductId = $cultureProductId;

        return $this;
    }

    /**
     * Get cultureProductId
     *
     * @return integer 
     */
    public function getCultureProductId()
    {
        return $this->cultureProductId;
    }

    /**
     * Set quoteShippingDetail
     *
     * @param \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteShippingDetail $quoteShippingDetail
     * @return QuoteProduct
     */
    public function setQuoteShippingDetail(\OfficeBrain\Bundle\QuoteBundle\Entity\QuoteShippingDetail $quoteShippingDetail = null)
    {
        $this->quoteShippingDetail = $quoteShippingDetail;

        return $this;
    }

    /**
     * Get quoteShippingDetail
     *
     * @return \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteShippingDetail 
     */
    public function getQuoteShippingDetail()
    {
        return $this->quoteShippingDetail;
    }

    /**
     * Add quoteVariationMaster
     *
     * @param \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteVariationMaster $quoteVariationMaster
     * @return QuoteProduct
     */
    public function addQuoteVariationMaster(\OfficeBrain\Bundle\QuoteBundle\Entity\QuoteVariationMaster $quoteVariationMaster)
    {
        $this->quoteVariationMaster[] = $quoteVariationMaster;

        return $this;
    }

    /**
     * Remove quoteVariationMaster
     *
     * @param \OfficeBrain\Bundle\QuoteBundle\Entity\QuoteVariationMaster $quoteVariationMaster
     */
    public function removeQuoteVariationMaster(\OfficeBrain\Bundle\QuoteBundle\Entity\QuoteVariationMaster $quoteVariationMaster)
    {
        $this->quoteVariationMaster->removeElement($quoteVariationMaster);
    }

    /**
     * Get quoteVariationMaster
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getQuoteVariationMaster()
    {
        return $this->quoteVariationMaster;
    }
}
