<?php/* * This file is part of the kProjet project. * * (c) Kodiom <info@kodiom.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */namespace App\Entity;use Doctrine\ORM\Mapping as ORM;use Symfony\Component\Validator\Constraints as Assert;use ApiPlatform\Core\Annotation\ApiResource;use App\Repository\SymptomeRepository;/** * Symptome * * @ApiResource * @ORM\Table() * @ORM\Entity(repositoryClass=SymptomeRepository::class) */class Symptome{ /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="label", type="string", length=255) * * @Assert\NotBlank() */ private $label; /** * @var bool * * @ORM\Column(name="actif", type="boolean") */ private $actif; /** * Constructor of Symptome Entity */ public function __construct() { $this->actif = true; } public function __toString() { return ($this->getLabel()) ? $this->getLabel() : ''; } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Get label * * @return string */ public function getLabel() { return $this->label; } /** * Set label * * @param string $label * * @return Symptome */ public function setLabel($label) { $this->label = $label; return $this; } /** * Get actif * * @return boolean */ public function getActif() { return $this->actif; } /** * Set actif * * @param bool $actif * * @return Symptome */ public function setActif($actif) { $this->actif = $actif; return $this; }}