<?php

namespace Neag\MainBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * OfferImage
 *
 * @ORM\Table(name="neag_offers_images", options={"collate"="utf8_general_ci"})
 * @ORM\Entity
 */
class ImageOffer
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="bigint", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;
    
    /**
     * @var \Image
     *
     * @ORM\ManyToOne(targetEntity="Image")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="image_id", referencedColumnName="id", onDelete="CASCADE")
     * })
     */
    private $image;
    
    /**
     * @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\Image $image
     * @return ImageOffer
     */
    public function setImage(\Neag\MainBundle\Entity\Image $image = null)
    {
        $this->image = $image;

        return $this;
    }

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

    /**
     * Set offer
     *
     * @param \Neag\MainBundle\Entity\Offer $offer
     * @return ImageOffer
     */
    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;
    }
}
