<?php

namespace AppBundle\Entity;

use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table
 * @ORM\Entity
 */
class FewoLodgingGroupImage
{
    /**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string
     *
     * @ORM\Column(name="full_file_name", type="string", length=255, nullable=false)
     * @Assert\Image(maxSize="15000000", mimeTypes={"image/jpeg", "image/png"})
     */
    private $file;

    /**
     * @var string
     *
     * @ORM\Column(name="file_name", type="string", length=255, nullable=false)
     * @Assert\NotBlank
     */
    private $fileName;

     /**
     * @var string
     *
     * @ORM\Column(name="comp", type="string", length=4, nullable=true)
     * @Assert\NotBlank
     */
    private $comp;

    /**
     * @var string
     *
     * @ORM\Column(name="pos", type="integer", nullable=false)
     * @Assert\NotBlank
     */
    private $pos;

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

    /**
     * @var \AppBundle\Entity\FewoLodgingGroup
     *
     * @ORM\ManyToOne(targetEntity="FewoLodgingGroup", inversedBy="images")
     * @ORM\JoinColumns({
     *  @ORM\JoinColumn(name="group_id", referencedColumnName="id", onDelete="SET NULL")
     * })
     */
    private $lodgingGroup;


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

    /**
     * Set file
     *
     * @param string $file
     *
     * @return FewoLodgingGroupImage
     */
    public function setFile($file)
    {
        $this->file = $file;

        return $this;
    }

    /**
     * Get file
     *
     * @return string
     */
    public function getFile()
    {
        return $this->file;
    }

    /**
     * Set description
     *
     * @param string $description
     *
     * @return FewoLodgingGroupImage
     */
    public function setDescription($description)
    {
        $this->description = $description;

        return $this;
    }

    /**
     * Get description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->description;
    }


     /**
     * Set comp
     *
     * @param string $comp
     *
     * @return FewoLodgingGroupImage
     */
    public function setComp($comp)
    {
        $this->comp = $comp;

        return $this;
    }

    /**
     * Get comp
     *
     * @return string
     */
    public function getComp()
    {
        return $this->comp;
    }


      /**
     * Set pos
     *
     * @param string $pos
     *
     * @return FewoLodgingGroupImage
     */
    public function setPos($pos)
    {
        $this->pos = $pos;

        return $this;
    }

    /**
     * Get pos
     *
     * @return string
     */
    public function getPos()
    {
        return $this->pos;
    }


    /**
     * Set lodgingGroup
     *
     * @param \AppBundle\Entity\FewoLodgingGroup $lodgingGroup
     *
     * @return FewoLodgingGroupImage
     */
    public function setLodgingGroup(\AppBundle\Entity\FewoLodgingGroup $lodgingGroup = null)
    {
        $this->lodgingGroup = $lodgingGroup;

        return $this;
    }

    /**
     * Get lodgingGroup
     *
     * @return \AppBundle\Entity\FewoLodgingGroup
     */
    public function getLodgingGroup()
    {
        return $this->lodgingGroup;
    }

    function __toString()
    {
        return $this->file;
    }

    /**
     * Set fileName
     *
     * @param string $fileName
     *
     * @return FewoLodgingGroupImage
     */
    public function setFileName($fileName)
    {
        $this->fileName = $fileName;

        return $this;
    }

    /**
     * Get fileName
     *
     * @return string
     */
    public function getFileName()
    {
        return $this->fileName;
    }
}
