src/Entity/PrescriptionPadOrder.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PrescriptionPadOrderRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\UX\Turbo\Attribute\Broadcast;
  9. #[ORM\Entity(repositoryClassPrescriptionPadOrderRepository::class)]
  10. #[Broadcast]
  11. class PrescriptionPadOrder
  12. {
  13.     use IdentifiableTrait;
  14.     #[ORM\Column]
  15.     private ?int $quantity null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $address null;
  18.     #[ORM\ManyToOne(inversedBy'prescriptionPadOrders')]
  19.     private ?Prescriber $prescriber null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  21.     private ?\DateTimeInterface $orderDate null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $comment null;
  24.     #[ORM\ManyToOne(inversedBy'prescriptionPadOrders')]
  25.     #[ORM\JoinColumn(nullablefalse)]
  26.     private ?PrescriptionPadOrderStatus $status null;
  27.     #[ORM\OneToMany(mappedBy'prescriptionPadOrder'targetEntityPrescriptionPad::class, cascade: ['persist'])]
  28.     private Collection $prescriptionPads;
  29.     #[ORM\Column(length255nullabletrue)]
  30.     private ?string $prescriptionPadNumbers null;
  31.     public function __construct()
  32.     {
  33.         $this->prescriptionPads = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getQuantity(): ?int
  40.     {
  41.         return $this->quantity;
  42.     }
  43.     public function setQuantity(int $quantity): self
  44.     {
  45.         $this->quantity $quantity;
  46.         return $this;
  47.     }
  48.     public function getAddress(): ?string
  49.     {
  50.         return $this->address;
  51.     }
  52.     public function setAddress(string $address): self
  53.     {
  54.         $this->address $address;
  55.         return $this;
  56.     }
  57.     public function getPrescriber(): ?Prescriber
  58.     {
  59.         return $this->prescriber;
  60.     }
  61.     public function setPrescriber(?Prescriber $prescriber): self
  62.     {
  63.         $this->prescriber $prescriber;
  64.         return $this;
  65.     }
  66.     public function getOrderDate(): ?\DateTimeInterface
  67.     {
  68.         return $this->orderDate;
  69.     }
  70.     public function setOrderDate(\DateTimeInterface $orderDate): self
  71.     {
  72.         $this->orderDate $orderDate;
  73.         return $this;
  74.     }
  75.     public function getComment(): ?string
  76.     {
  77.         return $this->comment;
  78.     }
  79.     public function setComment(?string $comment): self
  80.     {
  81.         $this->comment $comment;
  82.         return $this;
  83.     }
  84.     public function getStatus(): ?PrescriptionPadOrderStatus
  85.     {
  86.         return $this->status;
  87.     }
  88.     public function setStatus(?PrescriptionPadOrderStatus $status): self
  89.     {
  90.         $this->status $status;
  91.         return $this;
  92.     }
  93.     /**
  94.      * @return Collection<int, PrescriptionPad>
  95.      */
  96.     public function getPrescriptionPads(): Collection
  97.     {
  98.         return $this->prescriptionPads;
  99.     }
  100.     public function addPrescriptionPad(PrescriptionPad $prescriptionPad): self
  101.     {
  102.         if (!$this->prescriptionPads->contains($prescriptionPad)) {
  103.             $this->prescriptionPads->add($prescriptionPad);
  104.             $prescriptionPad->setPrescriptionPadOrder($this);
  105.         }
  106.         return $this;
  107.     }
  108.     public function removePrescriptionPad(PrescriptionPad $prescriptionPad): self
  109.     {
  110.         if ($this->prescriptionPads->removeElement($prescriptionPad)) {
  111.             // set the owning side to null (unless already changed)
  112.             if ($prescriptionPad->getPrescriptionPadOrder() === $this) {
  113.                 $prescriptionPad->setPrescriptionPadOrder(null);
  114.             }
  115.         }
  116.         return $this;
  117.     }
  118.     public function getPrescriptionPadNumbers(): ?string
  119.     {
  120.         return $this->prescriptionPadNumbers;
  121.     }
  122.     public function setPrescriptionPadNumbers(?string $prescriptionPadNumbers): self
  123.     {
  124.         $this->prescriptionPadNumbers $prescriptionPadNumbers;
  125.         return $this;
  126.     }
  127. }