src/Entity/Gos/SmsBody.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\SmsBodyRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=SmsBodyRepository::class)
  9.  */
  10. class SmsBody
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $name;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=SmsType::class, inversedBy="smsBodies")
  24.      */
  25.     private $smsType;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=SmsSendingMoment::class, inversedBy="smsBodies")
  28.      */
  29.     private $smsSendingMoment;
  30.     /**
  31.      * @ORM\Column(type="text", nullable=true)
  32.      */
  33.     private $content;
  34.     /**
  35.      * @ORM\Column(type="integer", nullable=true)
  36.      */
  37.     private $days;
  38.     /**
  39.      * @ORM\OneToMany(targetEntity=EventNotificationScheduler::class, mappedBy="smsBody")
  40.      */
  41.     private $eventNotificationSchedulers;
  42.     /**
  43.      * @ORM\Column(type="boolean", options={"default": true})
  44.      */
  45.     private $isActive true;
  46.     public function __construct()
  47.     {
  48.         $this->eventNotificationSchedulers = new ArrayCollection();
  49.     }
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getSmsType(): ?SmsType
  64.     {
  65.         return $this->smsType;
  66.     }
  67.     public function setSmsType(?SmsType $smsType): self
  68.     {
  69.         $this->smsType $smsType;
  70.         return $this;
  71.     }
  72.     public function getSmsSendingMoment(): ?SmsSendingMoment
  73.     {
  74.         return $this->smsSendingMoment;
  75.     }
  76.     public function setSmsSendingMoment(?SmsSendingMoment $smsSendingMoment): self
  77.     {
  78.         $this->smsSendingMoment $smsSendingMoment;
  79.         return $this;
  80.     }
  81.     public function getContent(): ?string
  82.     {
  83.         return $this->content;
  84.     }
  85.     public function setContent(?string $content): self
  86.     {
  87.         $this->content $content;
  88.         return $this;
  89.     }
  90.     public function getDays(): ?int
  91.     {
  92.         return $this->days;
  93.     }
  94.     public function setDays(?int $days): self
  95.     {
  96.         $this->days $days;
  97.         return $this;
  98.     }
  99.     /**
  100.      * @return Collection|EventNotificationScheduler[]
  101.      */
  102.     public function getEventNotificationSchedulers(): Collection
  103.     {
  104.         return $this->eventNotificationSchedulers;
  105.     }
  106.     public function addEventNotificationScheduler(EventNotificationScheduler $eventNotificationScheduler): self
  107.     {
  108.         if (!$this->eventNotificationSchedulers->contains($eventNotificationScheduler)) {
  109.             $this->eventNotificationSchedulers[] = $eventNotificationScheduler;
  110.             $eventNotificationScheduler->setSmsBody($this);
  111.         }
  112.         return $this;
  113.     }
  114.     public function removeEventNotificationScheduler(EventNotificationScheduler $eventNotificationScheduler): self
  115.     {
  116.         if ($this->eventNotificationSchedulers->contains($eventNotificationScheduler)) {
  117.             $this->eventNotificationSchedulers->removeElement($eventNotificationScheduler);
  118.             // set the owning side to null (unless already changed)
  119.             if ($eventNotificationScheduler->getSmsBody() === $this) {
  120.                 $eventNotificationScheduler->setSmsBody(null);
  121.             }
  122.         }
  123.         return $this;
  124.     }
  125.     public function isActive(): bool
  126.     {
  127.         return $this->isActive;
  128.     }
  129.     public function setIsActive(bool $isActive): SmsBody
  130.     {
  131.         $this->isActive $isActive;
  132.         return $this;
  133.     }
  134. }