<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Stop
*
* @ORM\Table(name="stop")
* @ORM\Entity(repositoryClass="App\Repository\StopRepository")
*/
class Stop
{
/**
* @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;
/**
* @ORM\ManyToOne(targetEntity="Line", inversedBy="stops")
* @ORM\JoinColumn(name="line_id", referencedColumnName="id")
*/
private $line;
public function __toString()
{
return $this->name;
}
/**
* Get id
*
* @return int
*/
public function getId()
{
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Stop
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set line
*
* @param \App\Entity\Line $line
*
* @return Stop
*/
public function setLine(\App\Entity\Line $line = null)
{
$this->line = $line;
return $this;
}
/**
* Get line
*
* @return \App\Entity\Line
*/
public function getLine()
{
return $this->line;
}
}