src/Entity/WardBed.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\WardBedRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. #[ORM\Entity(repositoryClassWardBedRepository::class), ORM\Table(name'ward_beds')]
  7. class WardBed
  8. {
  9.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  10.     private $id;
  11.     #[ORM\OneToOne(targetEntityCases::class, inversedBy'wardBed'cascade: ['persist''remove'])]
  12.     #[ORM\JoinColumn(name'case_id'nullablefalse)]
  13.     private $case;
  14.     #[ORM\ManyToOne(targetEntityWard::class), ORM\JoinColumn(nullablefalse)]
  15.     private $ward;
  16.     #[ORM\OneToOne(targetEntityDeliveryDetail::class, mappedBy'wardBed'cascade: ['persist''remove'])]
  17.     private $deliveryDetail;
  18.     #[ORM\Column(type'boolean')]
  19.     private bool $isSurgeryAdvised false;
  20.     #[ORM\Column(type'boolean')]
  21.     private bool $isComplications false;
  22.     #[ORM\Column(type'string'nullablefalsecolumnDefinition"enum('Admitted', 'Discharged', 'Referred', 'Death of Patient')")]
  23.     private string $status 'Admitted';
  24.     #[ORM\Column(type'string'length100nullabletrue)]
  25.     private $dischargeReason;
  26.     #[ORM\Column(type'boolean')]
  27.     private bool $isForPM false;
  28.     #[ORM\Column(type'text'nullabletrue)]
  29.     private $dischargeNote;
  30.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  31.     private $createdAt;
  32.     #[Gedmo\Timestampable(on'update'), ORM\Column(type'datetime')]
  33.     private $updatedAt;
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getCase(): ?Cases
  39.     {
  40.         return $this->case;
  41.     }
  42.     public function setCase(Cases $case): self
  43.     {
  44.         $this->case $case;
  45.         return $this;
  46.     }
  47.     public function getWard(): ?Ward
  48.     {
  49.         return $this->ward;
  50.     }
  51.     public function setWard(?Ward $ward): self
  52.     {
  53.         $this->ward $ward;
  54.         return $this;
  55.     }
  56.     public function getIsSurgeryAdvised(): ?bool
  57.     {
  58.         return $this->isSurgeryAdvised;
  59.     }
  60.     public function setIsSurgeryAdvised(bool $isSurgeryAdvised): self
  61.     {
  62.         $this->isSurgeryAdvised $isSurgeryAdvised;
  63.         return $this;
  64.     }
  65.     public function getIsComplications(): ?bool
  66.     {
  67.         return $this->isComplications;
  68.     }
  69.     public function setIsComplications(bool $isComplications): self
  70.     {
  71.         $this->isComplications $isComplications;
  72.         return $this;
  73.     }
  74.     public function getStatus(): ?string
  75.     {
  76.         return $this->status;
  77.     }
  78.     public function setStatus(string $status): self
  79.     {
  80.         $this->status $status;
  81.         return $this;
  82.     }
  83.     public function getDeliveryDetail(): ?DeliveryDetail
  84.     {
  85.         return $this->deliveryDetail;
  86.     }
  87.     public function setDeliveryDetail(DeliveryDetail $deliveryDetail): self
  88.     {
  89.         if ($deliveryDetail->getWardBed() !== $this) {
  90.             $deliveryDetail->setWardBed($this);
  91.         }
  92.         $this->deliveryDetail $deliveryDetail;
  93.         return $this;
  94.     }
  95.     public function hasDelivery(): bool
  96.     {
  97.         return $this->getDeliveryDetail() ? true false;
  98.     }
  99.     public function getCreatedAt(): ?\DateTimeInterface
  100.     {
  101.         return $this->createdAt;
  102.     }
  103.     public function getUpdatedAt(): ?\DateTimeInterface
  104.     {
  105.         return $this->updatedAt;
  106.     }
  107.     public function getDischargeReason(): ?string
  108.     {
  109.         return $this->dischargeReason;
  110.     }
  111.     public function setDischargeReason(?string $dischargeReason): self
  112.     {
  113.         $this->dischargeReason $dischargeReason;
  114.         return $this;
  115.     }
  116.     public function getIsForPM(): ?bool
  117.     {
  118.         return $this->isForPM;
  119.     }
  120.     public function setIsForPM(?bool $isForPM): self
  121.     {
  122.         $this->isForPM $isForPM;
  123.         return $this;
  124.     }
  125.     public function getDischargeNote(): ?string
  126.     {
  127.         return $this->dischargeNote;
  128.     }
  129.     public function setDischargeNote(?string $dischargeNote): self
  130.     {
  131.         $this->dischargeNote $dischargeNote;
  132.         return $this;
  133.     }
  134. }