Files
nineskeletor/src/Entity/Whitelist.php
Arnaud Fornerot b78f54b76c
All checks were successful
Cadoles/nineskeletor/pipeline/pr-master This commit looks good
fix(continuous-integration): correction php-cs-fixer
2022-09-23 16:14:15 +02:00

46 lines
823 B
PHP

<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @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;
public function getId(): ?int
{
return $this->id;
}
public function getLabel(): ?string
{
return $this->label;
}
public function setLabel(string $label): self
{
$this->label = $label;
return $this;
}
}