<?phpnamespace App\Entity\Gos;use App\Repository\Gos\SmsBodyRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=SmsBodyRepository::class) */class SmsBody{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\ManyToOne(targetEntity=SmsType::class, inversedBy="smsBodies") */ private $smsType; /** * @ORM\ManyToOne(targetEntity=SmsSendingMoment::class, inversedBy="smsBodies") */ private $smsSendingMoment; /** * @ORM\Column(type="text", nullable=true) */ private $content; /** * @ORM\Column(type="integer", nullable=true) */ private $days; /** * @ORM\OneToMany(targetEntity=EventNotificationScheduler::class, mappedBy="smsBody") */ private $eventNotificationSchedulers; /** * @ORM\Column(type="boolean", options={"default": true}) */ private $isActive = true; public function __construct() { $this->eventNotificationSchedulers = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getSmsType(): ?SmsType { return $this->smsType; } public function setSmsType(?SmsType $smsType): self { $this->smsType = $smsType; return $this; } public function getSmsSendingMoment(): ?SmsSendingMoment { return $this->smsSendingMoment; } public function setSmsSendingMoment(?SmsSendingMoment $smsSendingMoment): self { $this->smsSendingMoment = $smsSendingMoment; return $this; } public function getContent(): ?string { return $this->content; } public function setContent(?string $content): self { $this->content = $content; return $this; } public function getDays(): ?int { return $this->days; } public function setDays(?int $days): self { $this->days = $days; return $this; } /** * @return Collection|EventNotificationScheduler[] */ public function getEventNotificationSchedulers(): Collection { return $this->eventNotificationSchedulers; } public function addEventNotificationScheduler(EventNotificationScheduler $eventNotificationScheduler): self { if (!$this->eventNotificationSchedulers->contains($eventNotificationScheduler)) { $this->eventNotificationSchedulers[] = $eventNotificationScheduler; $eventNotificationScheduler->setSmsBody($this); } return $this; } public function removeEventNotificationScheduler(EventNotificationScheduler $eventNotificationScheduler): self { if ($this->eventNotificationSchedulers->contains($eventNotificationScheduler)) { $this->eventNotificationSchedulers->removeElement($eventNotificationScheduler); // set the owning side to null (unless already changed) if ($eventNotificationScheduler->getSmsBody() === $this) { $eventNotificationScheduler->setSmsBody(null); } } return $this; } public function isActive(): bool { return $this->isActive; } public function setIsActive(bool $isActive): SmsBody { $this->isActive = $isActive; return $this; }}