<?php

namespace OfficeBrain\Bundle\CouponBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @author OfficeBrain 4835 <info@officebrain.com>
 *  CouponProductMapping
 *
 * @ORM\Table(name="tbl_coupon_product_mapping")
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\CouponBundle\Entity\CouponProductMappingRepository")
 */
class CouponProductMapping
{
    /**
     * @var int
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\ManyToOne(targetEntity="OfficeBrain\Bundle\CouponBundle\Entity\Coupon")
     * @ORM\JoinColumn(name="coupon_id", referencedColumnName="id",onDelete="CASCADE")
     */
    private $couponId;

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

    /**
     * @var int
     *
     * @ORM\Column(name="product_id", type="integer",nullable=true)
     */
    private $productId;

    /**
     * @var string
     *
     * @ORM\Column(name="product_sku",type="string", length=255,nullable=true)
     */
    private $productSku;

    /**
     * @var string
     *
     * @ORM\Column(name="is_allowed", type="string",length=5)
     */
    private $isAllowed;

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

    /**
     * Set couponId.
     *
     * @param \OfficeBrain\Bundle\CouponBundle\Entity\Coupon $couponId
     *
     * @return CouponLanguage
     */
    public function setCouponId(\OfficeBrain\Bundle\CouponBundle\Entity\Coupon $couponId = null)
    {
        $this->couponId = $couponId;

        return $this;
    }

    /**
     * Get couponId.
     *
     * @return \OfficeBrain\Bundle\CouponBundle\Entity\Coupon
     */
    public function getCouponId()
    {
        return $this->couponId;
    }

    /**
     * Set countryId.
     *
     * @param int $countryId
     *
     * @return CouponProductMapping
     */
    public function setCountryId($countryId)
    {
        $this->countryId = $countryId;

        return $this;
    }

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

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

        return $this;
    }

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

    /**
     * Set productSku.
     *
     * @param string $productSku
     *
     * @return CouponProductMapping
     */
    public function setProductSku($productSku)
    {
        $this->productSku = $productSku;

        return $this;
    }

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

    /**
     * Set isAllowed.
     *
     * @param string $isAllowed
     *
     * @return Coupon
     */
    public function setIsAllowed($isAllowed)
    {
        $this->isAllowed = $isAllowed;

        return $this;
    }

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