<?php
namespace App\Entity;
use App\Repository\DeathCauseRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: DeathCauseRepository::class), ORM\Table(name: 'death_causes')]
class DeathCause implements \Stringable
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 5)]
private $code;
#[ORM\Column(type: 'string', length: 50)]
private $category;
#[ORM\Column(type: 'string', length: 100)]
private $cause;
public function getId(): ?int
{
return $this->id;
}
public function getCode(): ?string
{
return $this->code;
}
public function setCode(string $code): self
{
$this->code = $code;
return $this;
}
public function getCategory(): ?string
{
return $this->category;
}
public function setCategory(string $category): self
{
$this->category = $category;
return $this;
}
public function getCause(): ?string
{
return $this->cause;
}
public function setCause(string $cause): self
{
$this->cause = $cause;
return $this;
}
public function __toString(): string
{
return $this->getCause();
}
}