67 lines
1.1 KiB
PHP
67 lines
1.1 KiB
PHP
|
<?php
|
||
|
namespace Cadoles\CoreBundle\Entity;
|
||
|
|
||
|
use Doctrine\ORM\Mapping as ORM;
|
||
|
use Doctrine\Common\Collections\ArrayCollection;
|
||
|
|
||
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||
|
use Symfony\Component\Validator\Constraints as Assert;
|
||
|
|
||
|
/**
|
||
|
* @ORM\Entity
|
||
|
* @ORM\Table(name="whitelist")
|
||
|
* @ORM\HasLifecycleCallbacks()
|
||
|
*
|
||
|
* @UniqueEntity(fields="label", message="Une liste blanche existe déjà avec ce label")
|
||
|
*/
|
||
|
class Whitelist
|
||
|
{
|
||
|
/**
|
||
|
* @ORM\Column(type="integer")
|
||
|
* @ORM\Id
|
||
|
* @ORM\GeneratedValue(strategy="AUTO")
|
||
|
*/
|
||
|
private $id;
|
||
|
|
||
|
/**
|
||
|
* @ORM\Column(type="string", length=250, unique=true)
|
||
|
*/
|
||
|
private $label;
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Get id
|
||
|
*
|
||
|
* @return integer
|
||
|
*/
|
||
|
public function getId()
|
||
|
{
|
||
|
return $this->id;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Set label
|
||
|
*
|
||
|
* @param string $label
|
||
|
*
|
||
|
* @return Whitelist
|
||
|
*/
|
||
|
public function setLabel($label)
|
||
|
{
|
||
|
$this->label = $label;
|
||
|
|
||
|
return $this;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get label
|
||
|
*
|
||
|
* @return string
|
||
|
*/
|
||
|
public function getLabel()
|
||
|
{
|
||
|
return $this->label;
|
||
|
}
|
||
|
}
|