src/Entity/Profession.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProfessionRepository;
  4. use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ProfessionRepository::class)
  9.  * @UniqueEntity(fields={"label"}, message="Cette profession existe déjà")
  10.  * @Auditable()
  11.  */
  12. class Profession
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $label;
  24.     /**
  25.      * @ORM\Column(type="boolean")
  26.      */
  27.     private $isDeleted;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getLabel(): ?string
  33.     {
  34.         return $this->label;
  35.     }
  36.     public function setLabel(string $label): self
  37.     {
  38.         $this->label $label;
  39.         return $this;
  40.     }
  41.     public function getIsDeleted(): ?bool
  42.     {
  43.         return $this->isDeleted;
  44.     }
  45.     public function setIsDeleted(bool $isDeleted): self
  46.     {
  47.         $this->isDeleted $isDeleted;
  48.         return $this;
  49.     }
  50. }