* @date 02/15/2017 */ namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Redirect * * @ORM\Table(name="redirect") * @ORM\Entity(repositoryClass="AppBundle\Entity\RedirectRepository") */ class Redirect { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @ORM\Column(type="string", length=200, nullable=false, unique=true) */ private $sourceUrlPath; /** * @ORM\ManyToOne(targetEntity="AppBundle\Entity\Page") * @ORM\JoinColumn(name="page_id", referencedColumnName="id", nullable=false) */ protected $page; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set sourceUrlPath * * @param string $sourceUrlPath * * @return Redirect */ public function setSourceUrlPath($sourceUrlPath) { $this->sourceUrlPath = $sourceUrlPath; return $this; } /** * Get sourceUrlPath * * @return string */ public function getSourceUrlPath() { return $this->sourceUrlPath; } /** * Set page * * @param \AppBundle\Entity\Page $page * * @return Redirect */ public function setPage(\AppBundle\Entity\Page $page = null) { $this->page = $page; return $this; } /** * Get page * * @return \AppBundle\Entity\Page */ public function getPage() { return $this->page; } }