<?php
namespace AdminBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Tours
*/
#[ORM\Table(name: 'tours')]
#[ORM\Entity(repositoryClass: \AdminBundle\Repository\ToursRepository::class)]
class Tours
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var string
*/
#[ORM\Column(name: 'name', type: 'string', length: 255)]
private $name;
/**
* @var \DateTime
*/
#[ORM\Column(name: 'createdDate', type: 'datetime', nullable: true)]
private $createdDate;
/**
* @var string
*/
#[ORM\Column(name: 'description', type: 'text', length: 4294967295, nullable: true)]
private $description;
/**
* @var Images
*/
#[ORM\JoinColumn(name: 'image', referencedColumnName: 'id')]
#[ORM\OneToOne(targetEntity: \Images::class, inversedBy: 'tour')]
protected $image;
#[ORM\JoinTable(name: 'tours_objectives')]
#[ORM\ManyToMany(targetEntity: \Objectives::class, inversedBy: 'tours')]
private $objectives;
#[ORM\JoinTable(name: 'tours_start_points')]
#[ORM\ManyToMany(targetEntity: \Locations::class, inversedBy: 'toursStarts')]
private $startPoints;
#[ORM\JoinTable(name: 'tours_end_points')]
#[ORM\ManyToMany(targetEntity: \Locations::class, inversedBy: 'toursEnds')]
private $endPoints;
/**
* Constructor
*/
public function __construct()
{
$this->objectives = new ArrayCollection();
$this->startPoints = new ArrayCollection();
$this->endPoints = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Tours
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set createdDate
*
* @param \DateTime $createdDate
*
* @return Tours
*/
public function setCreatedDate($createdDate)
{
$this->createdDate = $createdDate;
return $this;
}
/**
* Get createdDate
*
* @return \DateTime
*/
public function getCreatedDate()
{
return $this->createdDate;
}
/**
* Set description
*
* @param string $description
*
* @return Tours
*/
public function setDescription($description)
{
$this->description = $description;
return $this;
}
/**
* Get description
*
* @return string
*/
public function getDescription()
{
return $this->description;
}
/**
* @return Images
*/
public function getImage()
{
return $this->image;
}
/**
* @param Images $image
*/
public function setImage($image)
{
$this->image = $image;
}
/**
* Add objective
*
* @param \AdminBundle\Entity\Objectives $objective
*
* @return Tours
*/
public function addObjective(Objectives $objective)
{
$this->objectives[] = $objective;
return $this;
}
/**
* Remove objective
*
* @param \AdminBundle\Entity\Objectives $objective
*/
public function removeObjective(Objectives $objective)
{
$this->objectives->removeElement($objective);
}
/**
* Get objectives
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getObjectives()
{
return $this->objectives;
}
/**
* Add startPoint
*
* @param \AdminBundle\Entity\Locations $startPoint
*
* @return Tours
*/
public function addStartPoint(Locations $startPoint)
{
$this->startPoints[] = $startPoint;
return $this;
}
/**
* Remove startPoint
*
* @param \AdminBundle\Entity\Locations $startPoint
*/
public function removeStartPoint(Locations $startPoint)
{
$this->startPoints->removeElement($startPoint);
}
/**
* Get startPoints
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getStartPoints()
{
return $this->startPoints;
}
/**
* Add endPoint
*
* @param \AdminBundle\Entity\Locations $endPoint
*
* @return Tours
*/
public function addEndPoint(Locations $endPoint)
{
$this->endPoints[] = $endPoint;
return $this;
}
/**
* Remove endPoint
*
* @param \AdminBundle\Entity\Locations $endPoint
*/
public function removeEndPoint(Locations $endPoint)
{
$this->endPoints->removeElement($endPoint);
}
/**
* Get endPoints
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getEndPoints()
{
return $this->endPoints;
}
}