<?php

namespace ProFolio\Bundle\ProFolioBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;

use Doctrine\ORM\Mapping as ORM;

use Symfony\Component\Validator\Constraints as Assert;

/**
 * ProFolio\Bundle\ProFolioBundle\Entity\Photo
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="ProFolio\Bundle\ProFolioBundle\Entity\PhotoRepository")
 * @ORM\HasLifecycleCallbacks()
 */
class Photo
{
    /**
     *
     */
    public function __construct() {
        $this->comments = new ArrayCollection();
    }

    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

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

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

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

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

    /**
     * @var text $description
     *
     * @ORM\Column(name="description", type="text")
     */
    private $description;

    /**
     * @var string $slug
     *
     * @ORM\Column(name="slug", type="string", length=255, unique="true")
     * @Assert\NotBlank
     */
    private $slug;

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

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

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

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

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

    /**
     * @var double exifAperture
     *
     * @ORM\Column(name="exifAperture", type="decimal", nullable="true")
     */
    private $exifAperture;

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

    /**
     * @var boolean exifFlash
     *
     * @ORM\Column(name="exifFlash", type="boolean", nullable="true")
     */
    private $exifFlash;

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

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

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

    /**
     * @var ArrayCollection $comments
     *
     * @ORM\OneToMany(targetEntity="Comment", mappedBy="photo")
     * @ORM\OrderBy({"createdAt" = "DESC"})
     */
    private $comments;

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

    /**
     * Set filename
     *
     * @param string $filename
     */
    public function setFilename($filename)
    {
        $this->filename = $filename;
    }

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

    /**
     * Set title
     *
     * @param string $title
     */
    public function setTitle($title)
    {
        $this->title = $title;
    }

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

    /**
     * Set description
     *
     * @param text $description
     */
    public function setDescription($description)
    {
        $this->description = $description;
    }

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

    /**
     * Set exif tags
     *
     * @param ArrayCollection $exifTags
     */
    public function setExifTags($exifTags)
    {
        $this->exifTags = $exifTags;
    }

    /**
     * Get exif tags
     *
     * @return ArrayCollection
     */
    public function getExifTags()
    {
        return $this->exifTags;
    }

    /**
     * Set slug
     *
     * @param string $slug
     */
    public function setSlug($slug)
    {
        $this->slug = $slug;
    }

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

    /**
     * Set exifCamera
     *
     * @param string $exifCamera
     */
    public function setExifCamera($exifCamera)
    {
        $this->exifCamera = $exifCamera;
    }

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

    /**
     * Set exifLens
     *
     * @param string $exifLens
     */
    public function setExifLens($exifLens)
    {
        $this->exifLens = $exifLens;
    }

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

    /**
     * Set exifDateShot
     *
     * @param datetime $exifDateShot
     */
    public function setExifDateShot($exifDateShot)
    {
        $this->exifDateShot = $exifDateShot;
    }

    /**
     * Get exifDateShot
     *
     * @return datetime
     */
    public function getExifDateShot()
    {
        return $this->exifDateShot;
    }

    /**
     * Set exifFocalLength
     *
     * @param string $exifFocalLength
     */
    public function setExifFocalLength($exifFocalLength)
    {
        $this->exifFocalLength = $exifFocalLength;
    }

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

    /**
     * Set exifShutterSpeed
     *
     * @param string $exifShutterSpeed
     */
    public function setExifShutterSpeed($exifShutterSpeed)
    {
        $this->exifShutterSpeed = $exifShutterSpeed;
    }

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

    /**
     * Set exifAperture
     *
     * @param decimal $exifAperture
     */
    public function setExifAperture($exifAperture)
    {
        $this->exifAperture = $exifAperture;
    }

    /**
     * Get exifAperture
     *
     * @return decimal
     */
    public function getExifAperture()
    {
        return $this->exifAperture;
    }

    /**
     * Set exifIso
     *
     * @param integer $exifIso
     */
    public function setExifIso($exifIso)
    {
        $this->exifIso = $exifIso;
    }

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

    /**
     * Set exifFlash
     *
     * @param boolean $exifFlash
     */
    public function setExifFlash($exifFlash)
    {
        $this->exifFlash = $exifFlash;
    }

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

    /**
     * Set exifExposureProgram
     *
     * @param string $exifExposureProgram
     */
    public function setExifExposureProgram($exifExposureProgram)
    {
        $this->exifExposureProgram = $exifExposureProgram;
    }

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

    /**
     * Set exifWidth
     *
     * @param integer $exifWidth
     */
    public function setExifWidth($exifWidth)
    {
        $this->exifWidth = $exifWidth;
    }

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

    /**
     * Set exifHeight
     *
     * @param integer $exifHeight
     */
    public function setExifHeight($exifHeight)
    {
        $this->exifHeight = $exifHeight;
    }

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

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

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

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

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

    /**
     * Set comments
     *
     * @param ArrayCollection $comments
     */
    public function setComments(ArrayCollection $comments)
    {
        $this->comments = $comments;
    }

    /**
     * Get comments
     *
     * @return \Doctrine\Common\Collections\ArrayCollection
     */
    public function getComments()
    {
        return $this->comments;
    }

    /**
     * @ORM\PrePersist()
     */
    public function executePrePersist()
    {
        $this->createdAt = new \DateTime();
    }

    /**
     * @ORM\PreUpdate()
     */
    public function executePreUpdate()
    {
        $this->updatedAt = new \DateTime();
    }
}