<?php
namespace App\Entity;
use App\Repository\CaseReferralRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
#[ORM\Entity(repositoryClass: CaseReferralRepository::class), ORM\Table(name: 'case_referrals')]
class CaseReferral
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column(type: 'integer')]
private $id;
#[ORM\ManyToOne(targetEntity: Cases::class, inversedBy: 'referrals')]
#[ORM\JoinColumn(name: 'case_id', nullable: false)]
private $case;
#[ORM\ManyToOne(targetEntity: Hospital::class), ORM\JoinColumn(nullable: false)]
private $hospital;
#[ORM\Column(type: 'text', nullable: true)]
private $expertOpinion;
#[ORM\ManyToOne(targetEntity: User::class), ORM\JoinColumn(name: 'doctor_id', nullable: false)]
private $doctor;
#[ORM\Column(type: 'string', length: 255)]
private $email;
#[ORM\Column(type: 'boolean')]
private bool $isOpinion = false;
#[ORM\Column(type: 'boolean')]
private bool $isOther = false;
#[ORM\Column(type: 'text', nullable: true)]
private $notes;
#[Gedmo\Timestampable(on: 'create'), ORM\Column(type: 'datetime')]
private $createdAt;
#[Gedmo\Timestampable(on: 'update'), ORM\Column(type: 'datetime')]
private $updatedAt;
public function getId(): ?int
{
return $this->id;
}
public function getCase(): ?Cases
{
return $this->case;
}
public function setCase(?Cases $case): self
{
$this->case = $case;
return $this;
}
public function getHospital(): ?Hospital
{
return $this->hospital;
}
public function setHospital(?Hospital $hospital): self
{
$this->hospital = $hospital;
return $this;
}
public function getExpertOpinion(): ?string
{
return $this->expertOpinion;
}
public function setExpertOpinion(string $expertOpinion): self
{
$this->expertOpinion = $expertOpinion;
return $this;
}
public function getDoctor(): ?User
{
return $this->doctor;
}
public function setDoctor(?User $doctor): self
{
$this->doctor = $doctor;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getIsOpinion(): ?bool
{
return $this->isOpinion;
}
public function setIsOpinion(bool $isOpinion): self
{
$this->isOpinion = $isOpinion;
return $this;
}
public function getIsOther(): ?bool
{
return $this->isOther;
}
public function setIsOther(bool $isOther): self
{
$this->isOther = $isOther;
return $this;
}
public function getNotes(): ?string
{
return $this->notes;
}
public function setNotes(?string $notes): self
{
$this->notes = $notes;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function getUpdatedAt(): ?\DateTimeInterface
{
return $this->updatedAt;
}
}