src/Entity/DeathCause.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\DeathCauseRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Entity(repositoryClassDeathCauseRepository::class), ORM\Table(name'death_causes')]
  6. class DeathCause implements \Stringable
  7. {
  8.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  9.     private $id;
  10.     #[ORM\Column(type'string'length5)]
  11.     private $code;
  12.     #[ORM\Column(type'string'length50)]
  13.     private $category;
  14.     #[ORM\Column(type'string'length100)]
  15.     private $cause;
  16.     public function getId(): ?int
  17.     {
  18.         return $this->id;
  19.     }
  20.     public function getCode(): ?string
  21.     {
  22.         return $this->code;
  23.     }
  24.     public function setCode(string $code): self
  25.     {
  26.         $this->code $code;
  27.         return $this;
  28.     }
  29.     public function getCategory(): ?string
  30.     {
  31.         return $this->category;
  32.     }
  33.     public function setCategory(string $category): self
  34.     {
  35.         $this->category $category;
  36.         return $this;
  37.     }
  38.     public function getCause(): ?string
  39.     {
  40.         return $this->cause;
  41.     }
  42.     public function setCause(string $cause): self
  43.     {
  44.         $this->cause $cause;
  45.         return $this;
  46.     }
  47.     public function __toString(): string
  48.     {
  49.         return $this->getCause();
  50.     }
  51. }