<?php
namespace App\Entity;
use App\Entity\GuardianRegister\GuardianRegister;
use App\Entity\Guardian\GuardianPriceDiscount;
use App\Entity\Guardian\GuardianSMSResponse;
use App\Repository\GuardianRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=GuardianRepository::class)
* @ORM\Table(name="guardian", indexes={
* @ORM\Index(name="g_email_phonenumber_status_idx", columns={"email", "phone_number", "status"}),
* })
* @UniqueEntity("email")
*/
class Guardian implements UserInterface, PasswordAuthenticatedUserInterface
{
const STATUS_PREPARING = [
'value' => "PREPARING",
'text' => 'Ruošiama',
'color' => '#f8d7da'
];
const STATUS_SENT = [
'value' => "SENT",
'text' => 'Išsiųsta',
'color' => '#fff3cd'
];
const STATUS_CONFIRMED = [
'value' => "CONFIRMED",
'text' => 'Patvirtinta',
'color' => '#d4edda'
];
const STATUS_CANCELLED = [
'value' => "CANCELLED",
'text' => 'Neaktyvus',
'color' => '#FF0000'
];
const STATUS_LEFT = [
'value' => "LEFT",
'text' => 'Išėjęs',
'color' => '#ffa600'
];
const STATUS_OVERPAID = [
'value' => "OVERPAID",
'text' => 'Permoka',
'color' => '#45C6F6'
];
const GUARDIAN_STATUSES = [self::STATUS_PREPARING, self::STATUS_SENT, self::STATUS_CONFIRMED, self::STATUS_CANCELLED, self::STATUS_LEFT, self::STATUS_OVERPAID];
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"CensorshipList","ResponsesList", "TeacherResponsesList", "GuardianRegisterList", "ChildPreferenceAssignmentList","LessonList", "NotificationList", "ChildPreferenceList", "AdminConfirmationsList"})
*/
private $id;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"showme"})
* @Groups({"GuardianList","ChildList","ResponsesList", "ChildPreferenceAssignmentList","LessonList", "NotificationList", "ChildPreferenceList"})
*/
private $fullname;
/**
* @ORM\Column(type="string", length=180, nullable=true)
* @Groups({"CensorshipList","showme","GuardianList","ChildList","ResponsesList", "ChildPreferenceAssignmentList","LessonList", "DeclineHistoryList", "NotificationList", "ChildPreferenceList", "AdminConfirmationsList"})
*/
private $email;
/**
* @ORM\Column(type="json")
*/
private $roles = [];
/**
* @var string The hashed password
* @ORM\Column(type="string")
*/
private $password;
/**
* @ORM\OneToMany(targetEntity=Child::class, mappedBy="guardian", cascade={"all"})
* @Groups({"GuardianList"})
*/
private $children;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"showme"})
* @Groups({"GuardianList", "TeacherResponsesList","LessonList", "ChildPreferenceList"})
*/
private $phoneNumber;
/**
* @ORM\Column(type="text", nullable=true)
* @Groups({"GuardianList"})
*/
private $comment;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $details;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianList"})
*/
private $balanceStatus = Payment::STATUS_NOTPAID;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"NotificationList"})
*/
private $profileImagePath;
/**
* @ORM\OneToMany(targetEntity=Payment::class, mappedBy="guardian", cascade={"all"})
*/
private $payments;
/**
* @ORM\OneToMany(targetEntity=PaymentLog::class, mappedBy="guardian", cascade={"all"})
*/
private $paymentLogs;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"showme","GuardianList"})
*/
private $dateAdd;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $status = self::STATUS_PREPARING['value'];
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $source;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $company;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $companyCode;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $vatNumber;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $invoicePurpose;
/**
* @ORM\Column(type="boolean", options={"default" : "1"})
*/
private $emailReminders = 1;
/**
* @ORM\Column(type="boolean", options={"default" : "1"})
*/
private $smsReminders = 1;
/**
* @ORM\Column(type="boolean", options={"default" : "0"})
*/
private $isFree = 0;
/**
* @ORM\Column(type="boolean", nullable=true,options={"default" : "0"})
*/
private $isDeleted = false;
/**
* @ORM\OneToMany(targetEntity=PriceChange::class, mappedBy="guardian", cascade={"all"})
*/
private $priceChanges;
/**
* @ORM\Column(type="boolean", nullable=true,options={"default" : "0"})
*/
private $showSurvey = false;
/**
* @ORM\OneToMany(targetEntity=GuardianSurvey::class, mappedBy="guardian")
*/
private $guardianSurveys;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"showme","GuardianList"})
*/
private $summer;
/**
* @ORM\Column(type="string", length=255, nullable=true)
* @Groups({"GuardianList"})
*/
private $summerAdditional;
private $summerDate;
/**
* @ORM\ManyToOne(targetEntity=Admin::class)
*/
private $summerByAdmin;
/**
* @ORM\OneToMany(targetEntity=CustomQuestionnaireGuardianAnswer::class, mappedBy="guardian")
*/
private $customQuestionnaireGuardianAnswers;
/**
* @ORM\ManyToOne(targetEntity=GuardianContract::class, inversedBy="guardians")
*/
private $guardianContract;
/**
* @ORM\OneToMany(targetEntity=PaymentNotificationLog::class, mappedBy="guardian")
*/
private $paymentNotificationLogs;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $blockNextDayLessonsReminders;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $blockTodayLessonsReminders;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastname;
/**
* @ORM\OneToOne(targetEntity=GuardianRegister::class, mappedBy="guardian", cascade={"persist", "remove"})
* @Groups({"ChildPreferenceAssignmentList","GuardianList"})
*/
private $guardianRegister;
/**
* @ORM\OneToOne(targetEntity=GuardianSMSResponse::class, mappedBy="guardian", cascade={"persist", "remove"})
*/
private $smsResponse;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $invoiceCompanyInfo = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $invoiceRealLessonAmount = 0;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $credentialsSent;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $childEmailModal;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianList"})
*/
private $autumn2024back;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $autumn2024backDate;
/**
* @ORM\ManyToOne(targetEntity=Admin::class)
*/
private $autumn2024backByAdmin;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $notCommingBack2024;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $notCommingBack2024Date;
/**
* @ORM\ManyToOne(targetEntity=Admin::class)
*/
private $notCommingBack2024ByAdmin;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianList"})
*/
private $progress;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $progressDate;
/**
* @ORM\ManyToOne(targetEntity=Admin::class)
*/
private $progressByAdmin;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $hourPrice;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $contractPricingFrom;
/**
* @ORM\OneToMany(targetEntity=GuardianPriceDiscount::class, mappedBy="guardian")
*/
private $guardianPriceDiscounts;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $priceNeverChanges;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $googleRefreshToken;
/**
* @ORM\Column(type="json", nullable=true)
*/
private $googleAccessToken = [];
/**
* @ORM\OneToMany(targetEntity=AdminConfirmation::class, mappedBy="guardian")
*/
private $adminConfirmations;
/**
* @ORM\OneToMany(targetEntity=GuardianActionLog::class, mappedBy="guardian")
*/
private $guardianActionLogs;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $referralCode;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $externalSurvey;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $feedback = 1;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"GuardianList"})
*/
private $summerAt;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $summerClass;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianList"})
*/
private $flagEarlyPayment;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $earlyPaymentDay;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $earlyPaymentFrom;
/**
* @ORM\OneToMany(targetEntity=EarlyPayment::class, mappedBy="guardian")
*/
private $earlyPayments;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $balance;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $chatStreamToken;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianList"})
*/
private $newPriceEmailSent;
/**
* @ORM\Column(type="datetime", nullable=true)
* @Groups({"GuardianList"})
*/
private $newEmailOpened;
/**
* @ORM\Column(type="boolean", nullable=true)
* @Groups({"GuardianList"})
*/
private $newEmailSubmitted;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $mobileAppLastUsedAt;
/**
* @ORM\OneToMany(targetEntity=ChatCensorshipJournal::class, mappedBy="guardian")
*/
private $chatCensorshipJournals;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $marksignName;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $marksignSurname;
public function __construct()
{
$this->children = new ArrayCollection();
$this->payments = new ArrayCollection();
$this->paymentLogs = new ArrayCollection();
$this->dateAdd = new \DateTime();
$this->priceChanges = new ArrayCollection();
$this->guardianSurveys = new ArrayCollection();
$this->customQuestionnaireGuardianAnswers = new ArrayCollection();
$this->paymentNotificationLogs = new ArrayCollection();
$this->guardianPriceDiscounts = new ArrayCollection();
$this->adminConfirmations = new ArrayCollection();
$this->guardianActionLogs = new ArrayCollection();
$this->earlyPayments = new ArrayCollection();
$this->chatCensorshipJournals = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUsername(): string
{
return (string)$this->email;
}
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = ['ROLE_GUARDIAN', 'ROLE_USER'];
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$roles = ['ROLE_GUARDIAN', 'ROLE_USER'];
$this->roles = $roles;
return $this;
}
/**
* @see UserInterface
*/
public function getPassword(): string
{
return (string)$this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function getSalt()
{
// not needed when using the "bcrypt" algorithm in security.yaml
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
/**
* @return Collection|Child[]
*/
public function getChildren(): Collection
{
return $this->children;
}
public function addChild(Child $child): self
{
if (!$this->children->contains($child)) {
$this->children[] = $child;
$child->setGuardian($this);
}
return $this;
}
public function removeChild(Child $child): self
{
if ($this->children->removeElement($child)) {
// set the owning side to null (unless already changed)
if ($child->getGuardian() === $this) {
$child->setGuardian(null);
}
}
return $this;
}
public function getFullname(): ?string
{
return $this->fullname;
}
public function setFullname(?string $fullname): self
{
$this->fullname = $fullname;
return $this;
}
public function getPhoneNumber(): ?string
{
return $this->phoneNumber;
}
public function setPhoneNumber(?string $phoneNumber): self
{
$this->phoneNumber = $phoneNumber;
return $this;
}
public function getInvoicePurpose(): ?string
{
return $this->invoicePurpose;
}
public function setInvoicePurpose(?string $invoicePurpose): self
{
$this->invoicePurpose = $invoicePurpose;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
public function getDetails(): ?string
{
return $this->details;
}
public function setDetails(?string $details): self
{
$this->details = $details;
return $this;
}
public function getBalanceStatus(): ?string
{
return $this->balanceStatus;
}
public function setBalanceStatus($balanceStatus): self
{
$this->balanceStatus = $balanceStatus;
return $this;
}
public function __toString()
{
return "{$this->fullname} {$this->email}";
}
public function getProfileImagePath(): ?string
{
return $this->profileImagePath;
}
public function setProfileImagePath(?string $profileImagePath): self
{
$this->profileImagePath = $profileImagePath;
return $this;
}
/**
* @return Collection|Payment[]
*/
public function getPayments(): Collection
{
return $this->payments;
}
public function addPayment(Payment $payment): self
{
if (!$this->payments->contains($payment)) {
$this->payments[] = $payment;
$payment->setGuardian($this);
}
return $this;
}
public function removePayment(Payment $payment): self
{
if ($this->payments->removeElement($payment)) {
// set the owning side to null (unless already changed)
if ($payment->getGuardian() === $this) {
$payment->setGuardian(null);
}
}
return $this;
}
/**
* @return Collection|PaymentLog[]
*/
public function getPaymentLogs(): Collection
{
return $this->paymentLogs;
}
public function addPaymentLog(PaymentLog $paymentLog): self
{
if (!$this->paymentLogs->contains($paymentLog)) {
$this->paymentLogs[] = $paymentLog;
$paymentLog->setGuardian($this);
}
return $this;
}
public function removePaymentLog(PaymentLog $paymentLog): self
{
if ($this->paymentLogs->removeElement($paymentLog)) {
// set the owning side to null (unless already changed)
if ($paymentLog->getGuardian() === $this) {
$paymentLog->setGuardian(null);
}
}
return $this;
}
public function getDateAdd(): ?\DateTimeInterface
{
return $this->dateAdd;
}
public function setDateAdd(\DateTimeInterface $dateAdd): self
{
$this->dateAdd = $dateAdd;
return $this;
}
public function getStatus(): ?string
{
$text = $this->status;
foreach (self::GUARDIAN_STATUSES as $STATUS) {
if ($STATUS['value'] == $this->status) {
$text = $STATUS['text'];
}
}
return $text;
}
public function setStatus(?string $status): self
{
foreach (self::GUARDIAN_STATUSES as $STATUS) {
if ($STATUS['text'] == $status) {
$status = $STATUS['value'];
}
}
$this->status = $status;
return $this;
}
public function getSource(): ?string
{
return $this->source;
}
public function setSource(?string $source): self
{
$this->source = $source;
return $this;
}
public function getCompany(): ?string
{
return $this->company;
}
public function setCompany(?string $company): self
{
$this->company = $company;
return $this;
}
public function getCompanyCode(): ?string
{
return $this->companyCode;
}
public function setCompanyCode(?string $companyCode): self
{
$this->companyCode = $companyCode;
return $this;
}
public function getVatNumber(): ?string
{
return $this->vatNumber;
}
public function setVatNumber(?string $vatNumber): self
{
$this->vatNumber = $vatNumber;
return $this;
}
public function getEmailReminders(): ?bool
{
return $this->emailReminders;
}
public function setEmailReminders(bool $emailReminders): self
{
$this->emailReminders = $emailReminders;
return $this;
}
public function getSmsReminders(): ?bool
{
return $this->smsReminders;
}
public function setSmsReminders(bool $smsReminders): self
{
$this->smsReminders = $smsReminders;
return $this;
}
public function getIsFree(): ?bool
{
return $this->isFree;
}
public function setIsFree(?bool $isFree): self
{
$this->isFree = $isFree;
return $this;
}
public function getIsDeleted(): ?bool
{
return $this->isDeleted;
}
public function setIsDeleted(?bool $isDeleted): self
{
$this->isDeleted = $isDeleted;
return $this;
}
/**
* @return Collection|PriceChange[]
*/
public function getPriceChanges(): Collection
{
return $this->priceChanges;
}
public function addPriceChange(PriceChange $priceChange): self
{
if (!$this->priceChanges->contains($priceChange)) {
$this->priceChanges[] = $priceChange;
$priceChange->setGuardian($this);
}
return $this;
}
public function removePriceChange(PriceChange $priceChange): self
{
if ($this->priceChanges->removeElement($priceChange)) {
// set the owning side to null (unless already changed)
if ($priceChange->getGuardian() === $this) {
$priceChange->setGuardian(null);
}
}
return $this;
}
public function getShowSurvey(): ?bool
{
return $this->showSurvey;
}
public function setShowSurvey(?bool $showSurvey): self
{
$this->showSurvey = $showSurvey;
return $this;
}
/**
* @return Collection|GuardianSurvey[]
*/
public function getGuardianSurveys(): Collection
{
return $this->guardianSurveys;
}
public function addGuardianSurvey(GuardianSurvey $guardianSurvey): self
{
if (!$this->guardianSurveys->contains($guardianSurvey)) {
$this->guardianSurveys[] = $guardianSurvey;
$guardianSurvey->setGuardian($this);
}
return $this;
}
public function removeGuardianSurvey(GuardianSurvey $guardianSurvey): self
{
if ($this->guardianSurveys->removeElement($guardianSurvey)) {
// set the owning side to null (unless already changed)
if ($guardianSurvey->getGuardian() === $this) {
$guardianSurvey->setGuardian(null);
}
}
return $this;
}
public function getSummer(): ?string
{
return $this->summer;
}
public function setSummer(?string $summer): self
{
$this->summer = $summer;
return $this;
}
public function getSummerAdditional(): ?string
{
return $this->summerAdditional;
}
public function setSummerAdditional(?string $summerAdditional): self
{
$this->summerAdditional = $summerAdditional;
return $this;
}
/**
* @return Collection|CustomQuestionnaireGuardianAnswer[]
*/
public function getCustomQuestionnaireGuardianAnswers(): Collection
{
return $this->customQuestionnaireGuardianAnswers;
}
public function addCustomQuestionnaireGuardianAnswer(CustomQuestionnaireGuardianAnswer $customQuestionnaireGuardianAnswer): self
{
if (!$this->customQuestionnaireGuardianAnswers->contains($customQuestionnaireGuardianAnswer)) {
$this->customQuestionnaireGuardianAnswers[] = $customQuestionnaireGuardianAnswer;
$customQuestionnaireGuardianAnswer->setGuardian($this);
}
return $this;
}
public function removeCustomQuestionnaireGuardianAnswer(CustomQuestionnaireGuardianAnswer $customQuestionnaireGuardianAnswer): self
{
if ($this->customQuestionnaireGuardianAnswers->removeElement($customQuestionnaireGuardianAnswer)) {
// set the owning side to null (unless already changed)
if ($customQuestionnaireGuardianAnswer->getGuardian() === $this) {
$customQuestionnaireGuardianAnswer->setGuardian(null);
}
}
return $this;
}
public function getGuardianContract(): ?GuardianContract
{
return $this->guardianContract;
}
public function setGuardianContract(?GuardianContract $guardianContract): self
{
$this->guardianContract = $guardianContract;
return $this;
}
/**
* @return Collection|PaymentNotificationLog[]
*/
public function getPaymentNotificationLogs(): Collection
{
return $this->paymentNotificationLogs;
}
public function addPaymentNotificationLog(PaymentNotificationLog $paymentNotificationLog): self
{
if (!$this->paymentNotificationLogs->contains($paymentNotificationLog)) {
$this->paymentNotificationLogs[] = $paymentNotificationLog;
$paymentNotificationLog->setGuardian($this);
}
return $this;
}
public function removePaymentNotificationLog(PaymentNotificationLog $paymentNotificationLog): self
{
if ($this->paymentNotificationLogs->removeElement($paymentNotificationLog)) {
// set the owning side to null (unless already changed)
if ($paymentNotificationLog->getGuardian() === $this) {
$paymentNotificationLog->setGuardian(null);
}
}
return $this;
}
public function getBlockNextDayLessonsReminders(): ?bool
{
return $this->blockNextDayLessonsReminders;
}
public function setBlockNextDayLessonsReminders(?bool $blockNextDayLessonsReminders): self
{
$this->blockNextDayLessonsReminders = $blockNextDayLessonsReminders;
return $this;
}
public function getBlockTodayLessonsReminders(): ?bool
{
return $this->blockTodayLessonsReminders;
}
public function setBlockTodayLessonsReminders(?bool $blockTodayLessonsReminders): self
{
$this->blockTodayLessonsReminders = $blockTodayLessonsReminders;
return $this;
}
public function getLastname(): ?string
{
return $this->lastname;
}
public function setLastname(?string $lastname): self
{
$this->lastname = $lastname;
return $this;
}
public function getGuardianRegister(): ?GuardianRegister
{
return $this->guardianRegister;
}
public function setGuardianRegister(?GuardianRegister $guardianRegister): self
{
// unset the owning side of the relation if necessary
if ($guardianRegister === null && $this->guardianRegister !== null) {
$this->guardianRegister->setGuardian(null);
}
// set the owning side of the relation if necessary
if ($guardianRegister !== null && $guardianRegister->getGuardian() !== $this) {
$guardianRegister->setGuardian($this);
}
$this->guardianRegister = $guardianRegister;
return $this;
}
public function getUnickoFunction(): ?bool
{
foreach ($this->children as $child) {
/**
* @var ChildPreference $childPreference
*/
foreach ($child->getChildPreferences() as $childPreference) {
$teacher = $childPreference->getTeacher();
if (isset($teacher) && $teacher->getUnickoFunction()) {
return true;
}
}
}
return false;
}
public function isInvoiceCompanyInfo(): ?bool
{
return $this->invoiceCompanyInfo;
}
public function setInvoiceCompanyInfo(?bool $invoiceCompanyInfo): self
{
$this->invoiceCompanyInfo = $invoiceCompanyInfo;
return $this;
}
public function isInvoiceRealLessonAmount(): ?bool
{
return $this->invoiceRealLessonAmount;
}
public function setInvoiceRealLessonAmount(?bool $invoiceRealLessonAmount): self
{
$this->invoiceRealLessonAmount = $invoiceRealLessonAmount;
return $this;
}
public function isCredentialsSent(): ?bool
{
return $this->credentialsSent;
}
public function setCredentialsSent(?bool $credentialsSent): self
{
$this->credentialsSent = $credentialsSent;
return $this;
}
public function getChildEmailModal(): ?\DateTimeInterface
{
return $this->childEmailModal;
}
public function setChildEmailModal(?\DateTimeInterface $childEmailModal): self
{
$this->childEmailModal = $childEmailModal;
return $this;
}
public function showChildEmailSurvey()
{
$showModal = false;
$children = $this->getChildren();
if (!$this->getChildEmailModal() || (new \DateTime())->format('Y-m') != $this->getChildEmailModal()->format('Y-m')) {
foreach ($children as $child) {
if (!$child->getEmail()) {
$showModal = true;
}
}
}
return $showModal;
}
public function isAutumn2024back(): ?bool
{
return $this->autumn2024back;
}
public function setAutumn2024back(?bool $autumn2024back): self
{
$this->autumn2024back = $autumn2024back;
return $this;
}
public function getAutumn2024backDate(): ?\DateTimeInterface
{
return $this->autumn2024backDate;
}
public function setAutumn2024backDate(?\DateTimeInterface $autumn2024backDate): self
{
$this->autumn2024backDate = $autumn2024backDate;
return $this;
}
public function getAutumn2024backByAdmin(): ?Admin
{
return $this->autumn2024backByAdmin;
}
public function setAutumn2024backByAdmin(?Admin $autumn2024backByAdmin): self
{
$this->autumn2024backByAdmin = $autumn2024backByAdmin;
return $this;
}
public function getSummerDate(): ?\DateTimeInterface
{
return $this->summerDate;
}
public function setSummerDate(?\DateTimeInterface $summerDate): self
{
$this->summerDate = $summerDate;
return $this;
}
public function getSummerByAdmin(): ?Admin
{
return $this->summerByAdmin;
}
public function setSummerByAdmin(?Admin $summerByAdmin): self
{
$this->summerByAdmin = $summerByAdmin;
return $this;
}
public function isNotCommingBack2024(): ?bool
{
return $this->notCommingBack2024;
}
public function setNotCommingBack2024(?bool $notCommingBack2024): self
{
$this->notCommingBack2024 = $notCommingBack2024;
return $this;
}
public function getNotCommingBack2024Date(): ?\DateTimeInterface
{
return $this->notCommingBack2024Date;
}
public function setNotCommingBack2024Date(?\DateTimeInterface $notCommingBack2024Date): self
{
$this->notCommingBack2024Date = $notCommingBack2024Date;
return $this;
}
public function getNotCommingBack2024ByAdmin(): ?Admin
{
return $this->notCommingBack2024ByAdmin;
}
public function setNotCommingBack2024ByAdmin(?Admin $notCommingBack2024ByAdmin): self
{
$this->notCommingBack2024ByAdmin = $notCommingBack2024ByAdmin;
return $this;
}
public function isProgress(): ?bool
{
return $this->progress;
}
public function setProgress(?bool $progress): self
{
$this->progress = $progress;
return $this;
}
public function getProgressDate(): ?\DateTimeInterface
{
return $this->progressDate;
}
public function setProgressDate(?\DateTimeInterface $progressDate): self
{
$this->progressDate = $progressDate;
return $this;
}
public function getProgressByAdmin(): ?Admin
{
return $this->progressByAdmin;
}
public function setProgressByAdmin(?Admin $progressByAdmin): self
{
$this->progressByAdmin = $progressByAdmin;
return $this;
}
public function getHourPrice(): ?float
{
return $this->hourPrice;
}
public function setHourPrice(?float $hourPrice): self
{
$this->hourPrice = $hourPrice;
return $this;
}
public function getContractPricingFrom(): ?\DateTimeInterface
{
return $this->contractPricingFrom;
}
public function setContractPricingFrom(?\DateTimeInterface $contractPricingFrom): self
{
$this->contractPricingFrom = $contractPricingFrom;
return $this;
}
/**
* @return Collection<int, GuardianPriceDiscount>
*/
public function getGuardianPriceDiscounts(): Collection
{
return $this->guardianPriceDiscounts;
}
public function addGuardianPriceDiscount(GuardianPriceDiscount $guardianPriceDiscount): self
{
if (!$this->guardianPriceDiscounts->contains($guardianPriceDiscount)) {
$this->guardianPriceDiscounts[] = $guardianPriceDiscount;
$guardianPriceDiscount->setGuardian($this);
}
return $this;
}
public function removeGuardianPriceDiscount(GuardianPriceDiscount $guardianPriceDiscount): self
{
if ($this->guardianPriceDiscounts->removeElement($guardianPriceDiscount)) {
// set the owning side to null (unless already changed)
if ($guardianPriceDiscount->getGuardian() === $this) {
$guardianPriceDiscount->setGuardian(null);
}
}
return $this;
}
public function isPriceNeverChanges(): ?bool
{
return $this->priceNeverChanges;
}
public function setPriceNeverChanges(?bool $priceNeverChanges): self
{
$this->priceNeverChanges = $priceNeverChanges;
return $this;
}
public function getGoogleRefreshToken(): ?string
{
return $this->googleRefreshToken;
}
public function setGoogleRefreshToken(?string $googleRefreshToken): self
{
$this->googleRefreshToken = $googleRefreshToken;
return $this;
}
public function getGoogleAccessToken(): ?array
{
return $this->googleAccessToken;
}
public function setGoogleAccessToken(?array $googleAccessToken): self
{
$this->googleAccessToken = $googleAccessToken;
return $this;
}
/**
* @return Collection<int, AdminConfirmation>
*/
public function getAdminConfirmations(): Collection
{
return $this->adminConfirmations;
}
public function addAdminConfirmation(AdminConfirmation $adminConfirmation): self
{
if (!$this->adminConfirmations->contains($adminConfirmation)) {
$this->adminConfirmations[] = $adminConfirmation;
$adminConfirmation->setGuardian($this);
}
return $this;
}
public function removeAdminConfirmation(AdminConfirmation $adminConfirmation): self
{
if ($this->adminConfirmations->removeElement($adminConfirmation)) {
// set the owning side to null (unless already changed)
if ($adminConfirmation->getGuardian() === $this) {
$adminConfirmation->setGuardian(null);
}
}
return $this;
}
/**
* @return Collection<int, GuardianActionLog>
*/
public function getGuardianActionLogs(): Collection
{
return $this->guardianActionLogs;
}
public function addGuardianActionLog(GuardianActionLog $guardianActionLog): self
{
if (!$this->guardianActionLogs->contains($guardianActionLog)) {
$this->guardianActionLogs[] = $guardianActionLog;
$guardianActionLog->setGuardian($this);
}
return $this;
}
public function removeGuardianActionLog(GuardianActionLog $guardianActionLog): self
{
if ($this->guardianActionLogs->removeElement($guardianActionLog)) {
// set the owning side to null (unless already changed)
if ($guardianActionLog->getGuardian() === $this) {
$guardianActionLog->setGuardian(null);
}
}
return $this;
}
public function getReferralCode(): ?string
{
return $this->referralCode;
}
public function setReferralCode(?string $referralCode): self
{
$this->referralCode = $referralCode;
return $this;
}
public function getExternalSurvey(): ?int
{
return $this->externalSurvey;
}
public function setExternalSurvey(?int $externalSurvey): self
{
$this->externalSurvey = $externalSurvey;
return $this;
}
public function getFeedback(): ?string
{
return $this->feedback;
}
public function setFeedback(?string $feedback): self
{
$this->feedback = $feedback;
return $this;
}
public function getSummerAt(): ?\DateTimeInterface
{
return $this->summerAt;
}
public function setSummerAt(?\DateTimeInterface $summerAt): self
{
$this->summerAt = $summerAt;
return $this;
}
public function isSummerClass(): ?bool
{
return $this->summerClass;
}
public function setSummerClass(?bool $summerClass): self
{
$this->summerClass = $summerClass;
return $this;
}
public function isFlagEarlyPayment(): ?bool
{
return $this->flagEarlyPayment;
}
public function setFlagEarlyPayment(?bool $flagEarlyPayment): self
{
$this->flagEarlyPayment = $flagEarlyPayment;
return $this;
}
public function getEarlyPaymentDay(): ?int
{
return $this->earlyPaymentDay;
}
public function setEarlyPaymentDay(?int $earlyPaymentDay): self
{
$this->earlyPaymentDay = $earlyPaymentDay;
return $this;
}
public function getEarlyPaymentFrom(): ?\DateTimeInterface
{
return $this->earlyPaymentFrom;
}
public function setEarlyPaymentFrom(?\DateTimeInterface $earlyPaymentFrom): self
{
$this->earlyPaymentFrom = $earlyPaymentFrom;
return $this;
}
/**
* @return Collection<int, EarlyPayment>
*/
public function getEarlyPayments(): Collection
{
return $this->earlyPayments;
}
public function addEarlyPayment(EarlyPayment $earlyPayment): self
{
if (!$this->earlyPayments->contains($earlyPayment)) {
$this->earlyPayments[] = $earlyPayment;
$earlyPayment->setGuardian($this);
}
return $this;
}
public function removeEarlyPayment(EarlyPayment $earlyPayment): self
{
if ($this->earlyPayments->removeElement($earlyPayment)) {
// set the owning side to null (unless already changed)
if ($earlyPayment->getGuardian() === $this) {
$earlyPayment->setGuardian(null);
}
}
return $this;
}
public function getBalance(): ?float
{
return $this->balance;
}
public function setBalance(?float $balance): self
{
$this->balance = $balance;
return $this;
}
public function getChatStreamToken(): ?string
{
return $this->chatStreamToken;
}
public function setChatStreamToken(?string $chatStreamToken): self
{
$this->chatStreamToken = $chatStreamToken;
return $this;
}
public function isNewPriceEmailSent(): ?bool
{
return $this->newPriceEmailSent;
}
public function setNewPriceEmailSent(?bool $newPriceEmailSent): self
{
$this->newPriceEmailSent = $newPriceEmailSent;
return $this;
}
public function getNewEmailOpened(): ?\DateTimeInterface
{
return $this->newEmailOpened;
}
public function setNewEmailOpened(?\DateTimeInterface $newEmailOpened): self
{
$this->newEmailOpened = $newEmailOpened;
return $this;
}
public function isNewEmailSubmitted(): ?bool
{
return $this->newEmailSubmitted;
}
public function setNewEmailSubmitted(?bool $newEmailSubmitted): self
{
$this->newEmailSubmitted = $newEmailSubmitted;
return $this;
}
public function getMobileAppLastUsedAt(): ?\DateTimeInterface
{
return $this->mobileAppLastUsedAt;
}
public function setMobileAppLastUsedAt(?\DateTimeInterface $mobileAppLastUsedAt): self
{
$this->mobileAppLastUsedAt = $mobileAppLastUsedAt;
return $this;
}
/**
* @return Collection<int, ChatCensorshipJournal>
*/
public function getChatCensorshipJournals(): Collection
{
return $this->chatCensorshipJournals;
}
public function addChatCensorshipJournal(ChatCensorshipJournal $chatCensorshipJournal): self
{
if (!$this->chatCensorshipJournals->contains($chatCensorshipJournal)) {
$this->chatCensorshipJournals[] = $chatCensorshipJournal;
$chatCensorshipJournal->setGuardian($this);
}
return $this;
}
public function removeChatCensorshipJournal(ChatCensorshipJournal $chatCensorshipJournal): self
{
if ($this->chatCensorshipJournals->removeElement($chatCensorshipJournal)) {
// set the owning side to null (unless already changed)
if ($chatCensorshipJournal->getGuardian() === $this) {
$chatCensorshipJournal->setGuardian(null);
}
}
return $this;
}
public function getMarksignName(): ?string
{
return $this->marksignName;
}
public function setMarksignName(?string $marksignName): self
{
$this->marksignName = $marksignName;
return $this;
}
public function getMarksignSurname(): ?string
{
return $this->marksignSurname;
}
public function setMarksignSurname(?string $marksignSurname): self
{
$this->marksignSurname = $marksignSurname;
return $this;
}
}