<?php

namespace AppBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * TravelPeriodDate
 *
 * @ORM\Table(name="travel_period_date", indexes={@ORM\Index(name="FK_travel_period_date_travel_period", columns={"period_id"})})
 * @ORM\Entity
 */
class TravelPeriodDate
{
    /**
     * @var integer
     *
     * @ORM\Column(name="year", type="integer", nullable=true)
     */
    private $year;

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

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

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

    /**
     * @var \AppBundle\Entity\TravelPeriod
     *
     * @ORM\ManyToOne(targetEntity="AppBundle\Entity\TravelPeriod", inversedBy="dates")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="", referencedColumnName="")
     * })
     */
    private $period;

    private $flightPeriod;

    /**
     * Set year
     *
     * @param integer $year
     *
     * @return TravelPeriodDate
     */
    public function setYear($year)
    {
        $this->year = $year;

        return $this;
    }

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

    /**
     * Set startDate
     *
     * @param \DateTime $startDate
     *
     * @return TravelPeriodDate
     */
    public function setStartDate($startDate)
    {
        $this->startDate = $startDate;

        return $this;
    }

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

    /**
     * Set endDate
     *
     * @param \DateTime $endDate
     *
     * @return TravelPeriodDate
     */
    public function setEndDate($endDate)
    {
        $this->endDate = $endDate;

        return $this;
    }

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

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

    /**
     * Set period
     *
     * @param \AppBundle\Entity\TravelPeriod $period
     *
     * @return TravelPeriodDate
     */
    public function setPeriod(\AppBundle\Entity\TravelPeriod $period = null)
    {
        $this->period = $period;

        return $this;
    }

    /**
     * Get period
     *
     * @return \AppBundle\Entity\TravelPeriod
     */
    public function getPeriod()
    {
        return $this->period;
    }

    /**
     * @return mixed
     */
    public function getFlightPeriod()
    {
        return $this->flightPeriod;
    }

    /**
     * @param mixed $flightPeriod
     */
    public function setFlightPeriod($flightPeriod)
    {
        $this->flightPeriod = $flightPeriod;
    }
}
