<?php

namespace OfficeBrain\Bundle\ProductTagBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * MarginProductMapping.
 *
 * @ORM\Table("tbl_margin_product_mapping", options={"type"="InnoDB","charset"="utf8","collate"="utf8_unicode_ci"})
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\ProductTagBundle\Entity\MarginProductMappingRepository")
 */
class MarginProductMapping
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="bigint", length=20, options={"unsigned"=true})
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * Bidirectional (OWNING SIDE - FK).
     *
     * @ORM\ManyToOne(targetEntity="MarginMaster", inversedBy="productMapping")
     * @ORM\JoinColumn(name="margin_id", nullable=false)
     */
    private $marginId;

    /**
     * @var int
     *
     * @ORM\Column(name="from_qty", type="integer")
     */
    private $fromQty;

    /**
     * @var int
     *
     * @ORM\Column(name="to_qty", type="integer")
     */
    private $toQty;

    /**
     * @var string
     *
     * @ORM\Column(name="code", type="string", length=10)
     */
    private $code;

    /**
     * @var int
     *
     * @ORM\Column(name="product_id", type="bigint", length=20)
     */
    private $productId;

    /**
     * @var float
     *
     * @ORM\Column(name="discount", type="float")
     */
    private $discount;

    /**
     * Get id.
     *
     * @return int
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set marginId.
     *
     * @param int $marginId
     *
     * @return MarginProductMapping
     */
    public function setMarginId($marginId)
    {
        $this->marginId = $marginId;

        return $this;
    }

    /**
     * Get marginId.
     *
     * @return int
     */
    public function getMarginId()
    {
        return $this->marginId;
    }

    /**
     * Set fromQty.
     *
     * @param int $fromQty
     *
     * @return MarginProductMapping
     */
    public function setFromQty($fromQty)
    {
        $this->fromQty = $fromQty;

        return $this;
    }

    /**
     * Get fromQty.
     *
     * @return int
     */
    public function getFromQty()
    {
        return $this->fromQty;
    }

    /**
     * Set toQty.
     *
     * @param int $toQty
     *
     * @return MarginProductMapping
     */
    public function setToQty($toQty)
    {
        $this->toQty = $toQty;

        return $this;
    }

    /**
     * Get toQty.
     *
     * @return int
     */
    public function getToQty()
    {
        return $this->toQty;
    }

    /**
     * Set code.
     *
     * @param string $code
     *
     * @return MarginProductMapping
     */
    public function setCode($code)
    {
        $this->code = $code;

        return $this;
    }

    /**
     * Get code.
     *
     * @return string
     */
    public function getCode()
    {
        return $this->code;
    }

    /**
     * Set productId.
     *
     * @param int $productId
     *
     * @return MarginProductMapping
     */
    public function setProductId($productId)
    {
        $this->productId = $productId;

        return $this;
    }

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

    /**
     * Set discount.
     *
     * @param float $discount
     *
     * @return MarginProductMapping
     */
    public function setDiscount($discount)
    {
        $this->discount = $discount;

        return $this;
    }

    /**
     * Get discount.
     *
     * @return float
     */
    public function getDiscount()
    {
        return $this->discount;
    }
}
