src/Entity/ClinicCommunicationMethods.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ClinicCommunicationMethodsRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassClinicCommunicationMethodsRepository::class)]
  8. class ClinicCommunicationMethods
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type'integer')]
  13.     private $id;
  14.     #[ORM\ManyToOne(targetEntityClinics::class, inversedBy'clinicCommunicationMethods')]
  15.     private $clinic;
  16.     #[ORM\ManyToOne(targetEntityCommunicationMethods::class, inversedBy'clinicCommunicationMethods')]
  17.     private $communicationMethod;
  18.     #[ORM\Column(type'string'length255)]
  19.     private $sendTo;
  20.     #[ORM\Column(type'datetime')]
  21.     private $modified;
  22.     #[ORM\Column(type'datetime')]
  23.     private $created;
  24.     #[ORM\Column(type'boolean'nullabletrue)]
  25.     private $isActive;
  26.     #[ORM\Column(type'string'length2nullabletrue)]
  27.     private $IsoCode;
  28.     #[ORM\Column(type'string'length5nullabletrue)]
  29.     private $intlCode;
  30.     #[ORM\OneToMany(targetEntityAvailabilityTracker::class, mappedBy'communication')]
  31.     private $availabilityTrackers;
  32.     #[ORM\Column(type'integer'nullabletrue)]
  33.     private $isDefault;
  34.     public function __construct()
  35.     {
  36.         $this->setCreated(new \DateTime());
  37.         if ($this->getModified() == null) {
  38.             $this->setModified(new \DateTime());
  39.         }
  40.         $this->availabilityTrackers = new ArrayCollection();
  41.     }
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     public function getClinic(): ?Clinics
  47.     {
  48.         return $this->clinic;
  49.     }
  50.     public function setClinic(?Clinics $clinic): self
  51.     {
  52.         $this->clinic $clinic;
  53.         return $this;
  54.     }
  55.     public function getCommunicationMethod(): ?CommunicationMethods
  56.     {
  57.         return $this->communicationMethod;
  58.     }
  59.     public function setCommunicationMethod(?CommunicationMethods $communicationMethod): self
  60.     {
  61.         $this->communicationMethod $communicationMethod;
  62.         return $this;
  63.     }
  64.     public function getSendTo(): ?string
  65.     {
  66.         return $this->sendTo;
  67.     }
  68.     public function setSendTo(string $sendTo): self
  69.     {
  70.         $this->sendTo $sendTo;
  71.         return $this;
  72.     }
  73.     public function getModified(): ?\DateTimeInterface
  74.     {
  75.         return $this->modified;
  76.     }
  77.     public function setModified(\DateTimeInterface $modified): self
  78.     {
  79.         $this->modified $modified;
  80.         return $this;
  81.     }
  82.     public function getCreated(): ?\DateTimeInterface
  83.     {
  84.         return $this->created;
  85.     }
  86.     public function setCreated(\DateTimeInterface $created): self
  87.     {
  88.         $this->created $created;
  89.         return $this;
  90.     }
  91.     public function getIsActive(): ?bool
  92.     {
  93.         return $this->isActive;
  94.     }
  95.     public function setIsActive(?bool $isActive): self
  96.     {
  97.         $this->isActive $isActive;
  98.         return $this;
  99.     }
  100.     public function getIsoCode(): ?string
  101.     {
  102.         return $this->IsoCode;
  103.     }
  104.     public function setIsoCode(?string $IsoCode): self
  105.     {
  106.         $this->IsoCode $IsoCode;
  107.         return $this;
  108.     }
  109.     public function getIntlCode(): ?string
  110.     {
  111.         return $this->intlCode;
  112.     }
  113.     public function setIntlCode(?string $intlCode): self
  114.     {
  115.         $this->intlCode $intlCode;
  116.         return $this;
  117.     }
  118.     /**
  119.      * @return Collection<int, AvailabilityTracker>
  120.      */
  121.     public function getAvailabilityTrackers(): Collection
  122.     {
  123.         return $this->availabilityTrackers;
  124.     }
  125.     public function addAvailabilityTracker(AvailabilityTracker $availabilityTracker): self
  126.     {
  127.         if (!$this->availabilityTrackers->contains($availabilityTracker)) {
  128.             $this->availabilityTrackers[] = $availabilityTracker;
  129.             $availabilityTracker->setCommunication($this);
  130.         }
  131.         return $this;
  132.     }
  133.     public function removeAvailabilityTracker(AvailabilityTracker $availabilityTracker): self
  134.     {
  135.         if ($this->availabilityTrackers->removeElement($availabilityTracker)) {
  136.             // set the owning side to null (unless already changed)
  137.             if ($availabilityTracker->getCommunication() === $this) {
  138.                 $availabilityTracker->setCommunication(null);
  139.             }
  140.         }
  141.         return $this;
  142.     }
  143.     public function getIsDefault(): ?int
  144.     {
  145.         return $this->isDefault;
  146.     }
  147.     public function setIsDefault(?int $isDefault): self
  148.     {
  149.         $this->isDefault $isDefault;
  150.         return $this;
  151.     }
  152. }