<?php

namespace Neag\MainBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * UserOffer
 *
 * @ORM\Table(name="neag_users_offers", options={"collate"="utf8_general_ci"})
 * @ORM\Entity
 */
class UserOffer
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;
    
    /**
     * @var \User
     *
     * @ORM\ManyToOne(targetEntity="User")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="user_id", referencedColumnName="id", onDelete="CASCADE")
     * })
     */
    private $user;
    
    /**
     * @var \Offer
     *
     * @ORM\ManyToOne(targetEntity="Offer")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="offer_id", referencedColumnName="id", onDelete="CASCADE")
     * })
     */
    private $offer; 

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

    /**
     * Set user
     *
     * @param \Neag\MainBundle\Entity\User $user
     * @return UserOffer
     */
    public function setUser(\Neag\MainBundle\Entity\User $user = null)
    {
        $this->user = $user;

        return $this;
    }

    /**
     * Get user
     *
     * @return \Neag\MainBundle\Entity\User 
     */
    public function getUser()
    {
        return $this->user;
    }

    /**
     * Set offer
     *
     * @param \Neag\MainBundle\Entity\Offer $offer
     * @return UserOffer
     */
    public function setOffer(\Neag\MainBundle\Entity\Offer $offer = null)
    {
        $this->offer = $offer;

        return $this;
    }

    /**
     * Get offer
     *
     * @return \Neag\MainBundle\Entity\Offer 
     */
    public function getOffer()
    {
        return $this->offer;
    }
}
