<?php
namespace AdminBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
/**
* Locations
*/
#[ORM\Table(name: 'locations')]
#[ORM\Entity(repositoryClass: \AdminBundle\Repository\LocationsRepository::class)]
class Locations
{
/**
* @var int
*/
#[ORM\Column(name: 'id', type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
private $id;
/**
* @var string
*/
#[ORM\Column(name: 'place_id', type: 'string', length: 255, nullable: true)]
private $placeId;
/**
* @var string
*/
#[ORM\Column(name: 'name', type: 'string', length: 255, nullable: true)]
private $name;
/**
* @var string
*/
#[ORM\Column(name: 'address', type: 'string', length: 255, nullable: true)]
private $address;
/**
* @var string
*/
#[ORM\Column(name: 'postcode', type: 'string', length: 255, nullable: true)]
private $postcode;
#[ORM\ManyToMany(targetEntity: \Tours::class, mappedBy: 'startPoints', cascade: ['persist'])]
private $toursStarts;
#[ORM\ManyToMany(targetEntity: \Tours::class, mappedBy: 'endPoints', cascade: ['persist'])]
private $toursEnds;
/**
* Constructor
*/
public function __construct()
{
$this->toursStarts = new ArrayCollection();
$this->toursEnds = new ArrayCollection();
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set placeId
*
* @param string $placeId
*
* @return Locations
*/
public function setPlaceId($placeId)
{
$this->placeId = $placeId;
return $this;
}
/**
* Get placeId
*
* @return string
*/
public function getPlaceId()
{
return $this->placeId;
}
/**
* Set name
*
* @param string $name
*
* @return Locations
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set address
*
* @param string $address
*
* @return Locations
*/
public function setAddress($address)
{
$this->address = $address;
return $this;
}
/**
* Get address
*
* @return string
*/
public function getAddress()
{
return $this->address;
}
/**
* Set postcode
*
* @param string $postcode
*
* @return Locations
*/
public function setPostcode($postcode)
{
$this->postcode = $postcode;
return $this;
}
/**
* Get postcode
*
* @return string
*/
public function getPostcode()
{
return $this->postcode;
}
/**
* Get toursStarts
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getToursStarts()
{
return $this->toursStarts;
}
/**
* Add toursStart
*
* @param \AdminBundle\Entity\Tours $toursStart
*
* @return Locations
*/
public function addToursStart(Tours $toursStart)
{
$this->toursStarts[] = $toursStart;
return $this;
}
/**
* Remove toursStart
*
* @param \AdminBundle\Entity\Tours $toursStart
*/
public function removeToursStart(Tours $toursStart)
{
$this->toursStarts->removeElement($toursStart);
}
/**
* Get toursEnds
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getToursEnds()
{
return $this->toursEnds;
}
/**
* Add toursEnd
*
* @param \AdminBundle\Entity\Tours $toursEnd
*
* @return Locations
*/
public function addToursEnd(Tours $toursEnd)
{
$this->toursEnds[] = $toursEnd;
return $this;
}
/**
* Remove toursEnd
*
* @param \AdminBundle\Entity\Tours $toursEnd
*/
public function removeTour(Tours $toursEnd)
{
$this->toursEnds->removeElement($toursEnd);
}
}