<?php
namespace App\Entity;
use App\Repository\VaccinationRepository;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VaccinationRepository::class)]
class Vaccination
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column(type: 'integer')]
private $id;
#[ORM\Column(type: 'string', length: 32, nullable: true)]
private $status;
#[ORM\Column(type: 'date', nullable: true)]
private $lastVaccinationDate;
#[ORM\Column(type: 'date', nullable: true)]
private $effectiveDate;
#[ORM\OneToOne(targetEntity: PersonalInfo::class, inversedBy: 'vaccination', cascade: ['persist', 'remove'])]
private $personalInfo;
public function getId(): ?int
{
return $this->id;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getLastVaccinationDate(): ?\DateTimeInterface
{
return $this->lastVaccinationDate;
}
public function setLastVaccinationDate(?\DateTimeInterface $lastVaccinationDate): self
{
$this->lastVaccinationDate = $lastVaccinationDate;
return $this;
}
public function getEffectiveDate(): ?\DateTimeInterface
{
return $this->effectiveDate;
}
public function setEffectiveDate(?\DateTimeInterface $effectiveDate): self
{
$this->effectiveDate = $effectiveDate;
return $this;
}
public function getPersonalInfo(): ?PersonalInfo
{
return $this->personalInfo;
}
public function setPersonalInfo(?PersonalInfo $personalInfo): self
{
$this->personalInfo = $personalInfo;
return $this;
}
}