src/Entity/Symptome.php line 26

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the kProjet project.
  4.  *
  5.  * (c) Kodiom <info@kodiom.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace App\Entity;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Validator\Constraints as Assert;
  13. use ApiPlatform\Core\Annotation\ApiResource;
  14. use App\Repository\SymptomeRepository;
  15. /**
  16.  * Symptome
  17.  *
  18.  * @ApiResource
  19.  * @ORM\Table()
  20.  * @ORM\Entity(repositoryClass=SymptomeRepository::class)
  21.  */
  22. class Symptome
  23. {
  24.     /**
  25.      * @var int
  26.      *
  27.      * @ORM\Column(name="id", type="integer")
  28.      * @ORM\Id
  29.      * @ORM\GeneratedValue(strategy="AUTO")
  30.      */
  31.     private $id;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="label", type="string", length=255)
  36.      *
  37.      * @Assert\NotBlank()
  38.      */
  39.     private $label;
  40.     /**
  41.      * @var bool
  42.      *
  43.      * @ORM\Column(name="actif", type="boolean")
  44.      */
  45.     private $actif;
  46.     /**
  47.      * Constructor of Symptome Entity
  48.      */
  49.     public function __construct()
  50.     {
  51.         $this->actif true;
  52.     }
  53.     public function __toString()
  54.     {
  55.         return ($this->getLabel()) ? $this->getLabel() : '';
  56.     }
  57.     /**
  58.      * Get id
  59.      *
  60.      * @return integer
  61.      */
  62.     public function getId()
  63.     {
  64.         return $this->id;
  65.     }
  66.     /**
  67.      * Get label
  68.      *
  69.      * @return string
  70.      */
  71.     public function getLabel()
  72.     {
  73.         return $this->label;
  74.     }
  75.     /**
  76.      * Set label
  77.      *
  78.      * @param string $label
  79.      *
  80.      * @return Symptome
  81.      */
  82.     public function setLabel($label)
  83.     {
  84.         $this->label $label;
  85.         return $this;
  86.     }
  87.     /**
  88.      * Get actif
  89.      *
  90.      * @return boolean
  91.      */
  92.     public function getActif()
  93.     {
  94.         return $this->actif;
  95.     }
  96.     /**
  97.      * Set actif
  98.      *
  99.      * @param bool $actif
  100.      *
  101.      * @return Symptome
  102.      */
  103.     public function setActif($actif)
  104.     {
  105.         $this->actif $actif;
  106.         return $this;
  107.     }
  108. }