src/Entity/ProvisionalDiagnosis.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProvisionalDiagnosisRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassProvisionalDiagnosisRepository::class), ORM\Table(name'provisional_diagnoses')]
  6. class ProvisionalDiagnosis implements \Stringable
  7. {
  8.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  9.     private $id;
  10.     #[ORM\Column(type'text')]
  11.     private $name;
  12.     #[ORM\ManyToOne(targetEntitySymptom::class), ORM\JoinColumn(nullablefalse)]
  13.     private $symptom;
  14.     public function getId(): ?int
  15.     {
  16.         return $this->id;
  17.     }
  18.     public function getName(): ?string
  19.     {
  20.         return $this->name;
  21.     }
  22.     public function setName(string $name): self
  23.     {
  24.         $this->name $name;
  25.         return $this;
  26.     }
  27.     public function getSymptom(): ?Symptom
  28.     {
  29.         return $this->symptom;
  30.     }
  31.     public function setSymptom(Symptom $symptom): self
  32.     {
  33.         $this->symptom $symptom;
  34.         return $this;
  35.     }
  36.     public function __toString(): string
  37.     {
  38.         return $this->getName();
  39.     }
  40. }