<?php
namespace w3des\AdminBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use w3des\AdminBundle\Model\ServiceAwareInterface;
/**
* @ORM\Table(uniqueConstraints={
* @ORM\UniqueConstraint(columns={"service","locale", "path"}, name="url_path_uniq", options={"charset" = "ascii", "collate" = "ascii_general_ci"}),
* @ORM\UniqueConstraint(columns={"service","locale", "slug"}, name="url_node_uniq", options={"charset" = "ascii", "collate" = "ascii_general_ci"}),
* }, indexes={
* @ORM\Index(name="url_service_idx", columns={"service"}),
* @ORM\Index(name="url_service_target_idx", columns={"type", "target"}),
* })
*
* @ORM\Entity()
*/
class Url implements ServiceAwareInterface
{
/**
* @ORM\Column(type="bigint")
* @ORM\Id()
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="integer")
*/
private $service;
/**
* @ORM\Column(type="string", length=2)
*/
private $locale;
/**
* @ORM\Column(type="string")
*/
private $slug;
/**
* @ORM\Column(type="string", length=1000)
*/
private $path;
/**
* @ORM\Column(type="string")
*/
private $type = 'node';
/**
* @ORM\Column(type="string")
*/
private $target;
public function getLocale()
{
return $this->locale;
}
public function setLocale($locale)
{
$this->locale = $locale;
return $this;
}
public function getSlug()
{
return $this->slug;
}
public function setSlug($slug)
{
$this->slug = $slug;
return $this;
}
public function getPath()
{
return $this->path;
}
public function setPath($path)
{
$this->path = $path;
return $this;
}
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return $service
*/
public function getService(): int
{
return $this->service;
}
/**
* @param mixed $service
*/
public function setService(int $service)
{
$this->service = $service;
}
/**
* @return $type
*/
public function getType()
{
return $this->type;
}
/**
* @param mixed $type
*/
public function setType($type)
{
$this->type = $type;
}
/**
* @return $target
*/
public function getTarget()
{
return $this->target;
}
/**
* @param mixed $target
*/
public function setTarget($target)
{
$this->target = $target;
}
}