<?phpnamespace App\Entity\Gos;use App\Repository\OnboardingSchedulerRepository;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=OnboardingSchedulerRepository::class) * @ORM\Table( * name="onboarding_scheduler", * indexes={ * @ORM\Index(name="idx_schedule_date_status", columns={"schedule_date", "is_successfuly_sent"}) * } * ) */class OnboardingScheduler{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\ManyToOne(targetEntity=User::class) * @ORM\JoinColumn(nullable=false) */ private $user; /** * @ORM\ManyToOne(targetEntity=Orders::class) * @ORM\JoinColumn(nullable=false) */ private $order; /** * @ORM\Column(type="integer") */ private $notificationType; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $notificationName; /** * @ORM\Column(type="date") */ private $scheduleDate; /** * @ORM\Column(type="time", nullable=true) */ private $scheduleTime; /** * @ORM\ManyToOne(targetEntity=SmsBody::class) */ private $smsBody; /** * @ORM\Column(type="datetime", nullable=true) */ private $sentAt; /** * @ORM\Column(type="boolean", options={"default": false}) */ private $isSuccessfulySent = false; public function getId(): ?int { return $this->id; } public function getUser(): User { return $this->user; } public function setUser(User $user): self { $this->user = $user; return $this; } public function getOrder(): Orders { return $this->order; } public function setOrder(Orders $orders): self { $this->order = $orders; return $this; } public function getNotificationType(): ?int { return $this->notificationType; } public function setNotificationType($notificationType): self { $this->notificationType = $notificationType; return $this; } public function getNotificationName(): ?string { return $this->notificationName; } public function setNotificationName(?string $notificationName): self { $this->notificationName = $notificationName; return $this; } public function getScheduleDate(): ?\DateTimeInterface { return $this->scheduleDate; } public function setScheduleDate(\DateTimeInterface $scheduleDate): self { $this->scheduleDate = $scheduleDate; return $this; } public function getScheduleTime(): ?\DateTimeInterface { return $this->scheduleTime; } public function setScheduleTime(\DateTimeInterface $scheduleTime): self { $this->scheduleTime = $scheduleTime; return $this; } public function getSmsBody(): ?SmsBody { return $this->smsBody; } public function setSmsBody(?SmsBody $smsBody): self { $this->smsBody = $smsBody; return $this; } public function getSentAt(): ?\DateTimeInterface { return $this->sentAt; } public function setSentAt($sentAt): self { $this->sentAt = $sentAt; return $this; } public function getIsSuccessfulySent(): bool { return $this->isSuccessfulySent; } public function setIsSuccessfulySent($isSuccessfulySent): self { $this->isSuccessfulySent = $isSuccessfulySent; return $this; } public function markAsSent(): void { $this->setIsSuccessfulySent(true); $this->sentAt = new \DateTime(); }}