<?php

namespace OfficeBrain\Bundle\RewardReferralBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * RewardReferralConfiguration
 *
 * @ORM\Table(name="tbl_reward_referral_configuration")
 * @ORM\Entity(repositoryClass="OfficeBrain\Bundle\RewardReferralBundle\Entity\RewardReferralConfigurationRepository")
 */
class RewardReferralConfiguration
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="conversion_rate", type="bigint")
     */
    private $conversionRate;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="expiry_in_days", type="integer")
     */
    private $expiryInDays;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="max_reward_point", type="integer")
     */
    private $maxRewardPoint;

    /**
     * @var boolean
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="show_on_product", type="boolean")
     */
    private $showOnProduct;

    /**
     * @var boolean
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="show_point_history", type="boolean")
     */
    private $showPointHistory;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="max_redeem_limit", type="bigint")
     */
    private $maxRedeemLimit;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="min_redeem_limit", type="bigint")
     */
    private $minRedeemLimit;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="max_referral_limit", type="bigint")
     */
    private $maxReferralLimit;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="registration_point_referrer", type="bigint")
     */
    private $registrationPointReferrer;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="registration_point_referent", type="bigint")
     */
    private $registrationPointReferent;

    
     /**
     * @var boolean
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="referral_on_purchase", type="boolean")
     */
    private $referralOnPurchase;

    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="max_purchase_limit", type="bigint")
     */
    private $maxPurchaseLimit;
    
    /**
     * @var integer
     * @Assert\NotBlank(message = "rewardreferral.admin.valid.not_blank")
     * @ORM\Column(name="max_referral_single_attempt_limit", type="bigint")
     */
    private $maxReferralSingleAttemptLimit;
    
    /**
     * @var integer
     
     * @ORM\Column(type="bigint", name="country_id",nullable=true)

     */
    private $countryId;
    
    /**
     * @var int
     *
     * @ORM\Column(name="status", type="integer", nullable=true)
     */
    private $status;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="product_point", type="integer")
     */
    private $productPoint;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="created_uid", type="bigint")
     */
    private $createdUid;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="created_at", type="datetime",nullable=true)
     */
    private $createdAt;

    /**
     * @var integer
     *
     * @ORM\Column(name="updated_uid", type="bigint")
     */
    private $updatedUid;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="updated_at", type="datetime")
     */
    private $updatedAt;

    /**
     * @var integer
     *
     * @ORM\Column(name="instance_id", type="bigint")
     */
    private $instanceId;

    /**
     * @var string
     *
     * @ORM\Column(name="instance_type", type="string", length=255)
     */
    private $instanceType;

     /**
     * @ORM\OneToMany(targetEntity="\OfficeBrain\Bundle\RewardReferralBundle\Entity\ReferralPurchasePoint", mappedBy="rewardreferralConfigurationId", cascade={"all"})
     */
    private $referralPurchasePoint;

    public function __construct()
    {
        $this->referralPurchasePoint = new ArrayCollection();
    }
    
    /**
     * Add referralPurchasePoint
     *
     * @param \OfficeBrain\Bundle\RewardReferralBundle\Entity\ReferralPurchasePoint $referralPurchasePoint
     * @return Coupon
     */
    public function addReferralPurchasePoint(\OfficeBrain\Bundle\RewardReferralBundle\Entity\ReferralPurchasePoint $referralPurchasePoint=null)
    {
        if ($referralPurchasePoint) {
            $this->referralPurchasePoint[] = $referralPurchasePoint;
        }

        return $this;
    }

    /**
     * Remove referralPurchasePoint
     *
     * @param \OfficeBrain\Bundle\RewardReferralBundle\Entity\ReferralPurchasePoint $referralPurchasePoint
     */
    public function removeReferralPurchasePoint(\OfficeBrain\Bundle\RewardReferralBundle\Entity\ReferralPurchasePoint $referralPurchasePoint)
    {
        $this->referralPurchasePoint->removeElement($referralPurchasePoint);
    }

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

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

    /**
     * Get conversionRate
     *
     * @return integer
     */
    public function setId($id)
    {
        $this->id = $id;

        return $this;
    }

    /**
     * Set conversionRate
     *
     * @param integer $conversionRate
     * @return RewardReferralConfiguration
     */
    public function setConversionRate($conversionRate)
    {
        $this->conversionRate = $conversionRate;

        return $this;
    }

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

    /**
     * Set expiryInDays
     *
     * @param integer $expiryInDays
     * @return RewardReferralConfiguration
     */
    public function setExpiryInDays($expiryInDays)
    {
        $this->expiryInDays = $expiryInDays;

        return $this;
    }

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

    /**
     * Set maxRewardPoint
     *
     * @param integer $maxRewardPoint
     * @return RewardReferralConfiguration
     */
    public function setMaxRewardPoint($maxRewardPoint)
    {
        $this->maxRewardPoint = $maxRewardPoint;

        return $this;
    }

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

    /**
     * Set showOnProduct
     *
     * @param boolean $showOnProduct
     * @return RewardReferralConfiguration
     */
    public function setShowOnProduct($showOnProduct)
    {
        $this->showOnProduct = $showOnProduct;

        return $this;
    }

    /**
     * Get showOnProduct
     *
     * @return boolean
     */
    public function getShowOnProduct()
    {
        return $this->showOnProduct;
    }

    /**
     * Set showPointHistory
     *
     * @param boolean $showPointHistory
     * @return RewardReferralConfiguration
     */
    public function setShowPointHistory($showPointHistory)
    {
        $this->showPointHistory = $showPointHistory;

        return $this;
    }

    /**
     * Get showPointHistory
     *
     * @return boolean
     */
    public function getShowPointHistory()
    {
        return $this->showPointHistory;
    }

    /**
     * Set maxRedeemLimit
     *
     * @param integer $maxRedeemLimit
     * @return RewardReferralConfiguration
     */
    public function setMaxRedeemLimit($maxRedeemLimit)
    {
        $this->maxRedeemLimit = $maxRedeemLimit;

        return $this;
    }

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

    /**
     * Set minRedeemLimit
     *
     * @param integer $minRedeemLimit
     * @return RewardReferralConfiguration
     */
    public function setMinRedeemLimit($minRedeemLimit)
    {
        $this->minRedeemLimit = $minRedeemLimit;

        return $this;
    }

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

    /**
     * Set maxReferralLimit
     *
     * @param integer $maxReferralLimit
     * @return RewardReferralConfiguration
     */
    public function setMaxReferralLimit($maxReferralLimit)
    {
        $this->maxReferralLimit = $maxReferralLimit;

        return $this;
    }

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

    /**
     * Set registrationPointReferrer
     *
     * @param integer $registrationPointReferrer
     * @return RewardReferralConfiguration
     */
    public function setRegistrationPointReferrer($registrationPointReferrer)
    {
        $this->registrationPointReferrer = $registrationPointReferrer;

        return $this;
    }

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

    /**
     * Set registrationPointReferent
     *
     * @param integer $registrationPointReferent
     * @return RewardReferralConfiguration
     */
    public function setRegistrationPointReferent($registrationPointReferent)
    {
        $this->registrationPointReferent = $registrationPointReferent;

        return $this;
    }

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

    /**
     * Set referralOnPurchase
     *
     * @param integer $referralOnPurchase
     * @return RewardReferralConfiguration
     */
    public function setReferralOnPurchase($referralOnPurchase)
    {
        $this->referralOnPurchase = $referralOnPurchase;

        return $this;
    }

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

    /**
     * Set maxPurchaseLimit
     *
     * @param integer $maxPurchaseLimit
     * @return RewardReferralConfiguration
     */
    public function setMaxPurchaseLimit($maxPurchaseLimit)
    {
        $this->maxPurchaseLimit = $maxPurchaseLimit;

        return $this;
    }

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

        
    /**
     * Set maxReferralSingleAttemptLimit
     *
     * @param integer $maxPurchaseLimit
     * @return RewardReferralConfiguration
     */
    public function setMaxReferralSingleAttemptLimit($maxReferralSingleAttemptLimit)
    {
        $this->maxReferralSingleAttemptLimit = $maxReferralSingleAttemptLimit;

        return $this;
    }

    /**
     * Get maxReferralSingleAttemptLimit
     *
     * @return integer
     */
    public function getMaxReferralSingleAttemptLimit()
    {
        return $this->maxReferralSingleAttemptLimit;
    }
    /**
     * Set productPoint
     *
     * @param integer $productPoint
     * @return RewardReferralConfiguration
     */
    public function setProductPoint($productPoint)
    {
        $this->productPoint = $productPoint;

        return $this;
    }
    
    /**
     * Get productPoint
     *
     * @return integer
     */
    public function getProductPoint()
    {
        return $this->productPoint;
    }
    /**
     * Set createdUid
     *
     * @param integer $createdUid
     * @return RewardReferralConfiguration
     */
    public function setCreatedUid($createdUid)
    {
        $this->createdUid = $createdUid;

        return $this;
    }

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

    /**
     * Set createdAt
     *
     * @param \DateTime $createdAt
     * @return Coupon
     */
    public function setCreatedAt($createdAt)
    {
        $this->createdAt = $createdAt;

        return $this;
    }

    /**
     * Get createdAt
     *
     * @return \DateTime
     */
    public function getCreatedAt()
    {
        return $this->createdAt;
    }

    /**
     * Set updatedUid
     *
     * @param integer $updatedUid
     * @return RewardReferralConfiguration
     */
    public function setUpdatedUid($updatedUid)
    {
        $this->updatedUid = $updatedUid;

        return $this;
    }

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

    /**
     * Set updatedAt
     *
     * @param \DateTime $updatedAt
     * @return RewardReferralConfiguration
     */
    public function setUpdatedAt($updatedAt)
    {
        $this->updatedAt = $updatedAt;

        return $this;
    }

    /**
     * Get updatedAt
     *
     * @return \DateTime
     */
    public function getUpdatedAt()
    {
        return $this->updatedAt;
    }

    /**
     * Set instanceId
     *
     * @param integer $instanceId
     * @return RewardReferralConfiguration
     */
    public function setInstanceId($instanceId)
    {
        $this->instanceId = $instanceId;

        return $this;
    }

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

    /**
     * Set instanceType
     *
     * @param string $instanceType
     * @return RewardReferralConfiguration
     */
    public function setInstanceType($instanceType)
    {
        $this->instanceType = $instanceType;

        return $this;
    }

    /**
     * Get instanceType
     *
     * @return string
     */
    public function getInstanceType()
    {
        return $this->instanceType;
    }
    
    /**
     * Set status.
     *
     * @param int $status
     *
     * @return RewardReferralConfiguration
     */
    public function setStatus($status)
    {
        $this->status = $status;

        return $this;
    }

    /**
     * Get status.
     *
     * @return int
     */
    public function getStatus()
    {
        return $this->status;
    }
    
   /**
     * Set countryId
     *
     * @param integer $countryId
     * @return RewardReferralConfiguration
     */
    public function setCountryId($countryId)
    {
        $this->countryId = $countryId;

        return $this;
    }

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