src/Entity/CRM/Consultant.php line 27

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Entity\CRM\NominalWorkTime;
  4. use App\Entity\CRM\Notification;
  5. use App\Entity\CRM\Order;
  6. use App\Entity\CRM\OrderDivided;
  7. use App\Entity\CRM\OrderHistory;
  8. use App\Entity\CRM\OrderNote;
  9. use App\Entity\CRM\Position;
  10. use App\Entity\CRM\Reservations;
  11. use App\Entity\CRM\SmsHistory;
  12. use App\Entity\CRM\SurveyResponse;
  13. use App\Entity\CRM\WorkHistory;
  14. use App\Entity\CRM\WorkTime;
  15. use App\Entity\CRM\ZoomList;
  16. use App\Repository\ConsultantRepository;
  17. use Doctrine\Common\Collections\ArrayCollection;
  18. use Doctrine\Common\Collections\Collection;
  19. use Doctrine\DBAL\Types\Types;
  20. use Doctrine\ORM\Mapping as ORM;
  21. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  22. use Symfony\Component\Security\Core\User\UserInterface;
  23. #[ORM\Entity(repositoryClassConsultantRepository::class)]
  24. class Consultant implements UserInterfacePasswordAuthenticatedUserInterface
  25. {
  26.     #[ORM\Id]
  27.     #[ORM\GeneratedValue]
  28.     #[ORM\Column]
  29.     private ?int $id null;
  30.     #[ORM\Column(length255)]
  31.     private string $firstName;
  32.     #[ORM\Column(length255)]
  33.     private string $lastName;
  34.     #[ORM\Column(length255)]
  35.     private string $email;
  36.     #[ORM\Column(length255nullabletrue)]
  37.     private ?string $phone null;
  38.     #[ORM\Column(length255nullabletrue)]
  39.     private ?string $photo null;
  40.     #[ORM\Column]
  41.     private ?bool $isActive null;
  42.     /**
  43.      * @var string The hashed password
  44.      */
  45.     #[ORM\Column]
  46.     private string $password;
  47.     #[ORM\Column]
  48.     private array $roles = [];
  49.     #[ORM\ManyToOne(inversedBy'consultants')]
  50.     #[ORM\JoinColumn(nullablefalse)]
  51.     private ?Department $department null;
  52.     #[ORM\OneToMany(mappedBy'consultant'targetEntityOrder::class)]
  53.     private Collection $orders;
  54.     #[ORM\OneToMany(mappedBy'consultant'targetEntityCustomer::class)]
  55.     private Collection $customers;
  56.     #[ORM\ManyToMany(targetEntityNotification::class, mappedBy'consultant')]
  57.     private Collection $notifications;
  58.     #[ORM\OneToMany(mappedBy'consultant'targetEntityOrderNote::class)]
  59.     private Collection $orderNotes;
  60.     #[ORM\OneToMany(mappedBy'orderDividedConsultant'targetEntityOrder::class)]
  61.     private Collection $dividedOrders;
  62.     #[ORM\OneToMany(mappedBy'consultant'targetEntityOrderHistory::class)]
  63.     private Collection $orderHistories;
  64.     #[ORM\Column]
  65.     private ?int $bonusPercentage null;
  66.     #[ORM\OneToMany(mappedBy'consultant'targetEntityConsultantReward::class, orphanRemovaltrue)]
  67.     private Collection $consultantRewards;
  68.     #[ORM\ManyToMany(targetEntityCommercialOffer::class, mappedBy'AvailableForConsultants')]
  69.     private Collection $commercialOffers;
  70.     #[ORM\OneToMany(mappedBy'consultant'targetEntityWorkHistory::class)]
  71.     private Collection $workHistories;
  72.     #[ORM\OneToMany(mappedBy'createdByConsultant'targetEntityCommercialOfferIndividual::class)]
  73.     private Collection $commercialOfferIndividuals;
  74.     #[ORM\OneToMany(mappedBy'addedByConsultant'targetEntityCommercialOfferSendings::class)]
  75.     private Collection $commercialOfferSendings;
  76.     #[ORM\OneToMany(mappedBy'senderConsultant'targetEntityDirectMessage::class)]
  77.     private Collection $directMessagesSent;
  78.     #[ORM\OneToMany(mappedBy'receiverConsultant'targetEntityDirectMessage::class)]
  79.     private Collection $directMessagesReceived;
  80.     #[ORM\Column]
  81.     private ?bool $remoteAccess null;
  82.     #[ORM\OneToMany(mappedBy'addedByConsultant'targetEntityReservations::class)]
  83.     private Collection $reservations;
  84.     #[ORM\Column(length255nullabletrue)]
  85.     private ?string $color null;
  86.     #[ORM\OneToMany(mappedBy'Consultant'targetEntityDebtNote::class)]
  87.     private Collection $debtNotes;
  88.     #[ORM\OneToMany(mappedBy'consultant'targetEntityOrderDivided::class, orphanRemovaltrue)]
  89.     private Collection $orderDivideds;
  90.     #[ORM\OneToMany(mappedBy'consultant'targetEntityCustomerHistory::class)]
  91.     private Collection $customerHistories;
  92.     #[ORM\OneToMany(mappedBy'consultant'targetEntityAwards::class, orphanRemovaltrue)]
  93.     private Collection $awards;
  94.     #[ORM\ManyToOne(inversedBy'consultants')]
  95.     private ?AwardLeague $awardLeague null;
  96.     #[ORM\OneToMany(mappedBy'consultant'targetEntityAwardPtSum::class, orphanRemovaltrue)]
  97.     private Collection $awardPtSums;
  98.     #[ORM\OneToMany(mappedBy'consultant'targetEntityAwardsDraw::class, orphanRemovaltrue)]
  99.     private Collection $awardsDraws;
  100.     #[ORM\Column]
  101.     private bool $inAwards true;
  102.     #[ORM\ManyToMany(targetEntityOrder::class, mappedBy'consultantForNotes')]
  103.     private Collection $ordersToNotes;
  104.     #[ORM\OneToMany(mappedBy'sendByConsultant'targetEntitySmsHistory::class)]
  105.     private Collection $smsHistories;
  106.     #[ORM\OneToOne(mappedBy'Consultant'cascade: ['persist''remove'])]
  107.     private ?NominalWorkTime $nominalWorkTime null;
  108.     #[ORM\OneToMany(mappedBy'consultant'targetEntityWorkTime::class)]
  109.     private Collection $workTimes;
  110.     #[ORM\Column]
  111.     private ?bool $remoteWork null;
  112.     #[ORM\OneToMany(mappedBy'consultant'targetEntityLeaveRequest::class, orphanRemovaltrue)]
  113.     private Collection $leaveRequests;
  114.     #[ORM\OneToMany(mappedBy'changedByConsultant'targetEntityEntityChangeLog::class)]
  115.     private Collection $entityChangeLogs;
  116.     #[ORM\OneToMany(mappedBy'madeBy'targetEntitySurveyResponse::class)]
  117.     private Collection $surveyResponses;
  118.     #[ORM\ManyToOne(inversedBy'consultants')]
  119.     private ?Position $position null;
  120.     #[ORM\OneToMany(mappedBy'consultant'targetEntityZoomList::class)]
  121.     private Collection $zoomLists;
  122.     #[ORM\ManyToOne(inversedBy'consultants')]
  123.     private ?EmploymentContractType $consultantContractType null;
  124.     #[ORM\OneToMany(mappedBy'consultant'targetEntityAccountingOfficeSendingNote::class)]
  125.     private Collection $accountingOfficeSendingNotes;
  126.     #[ORM\Column]
  127.     private ?bool $acceptedRegulations null;
  128.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  129.     private ?\DateTimeInterface $acceptedRegulationsDate null;
  130.     #[ORM\Column]
  131.     private ?bool $acceptedZfss null;
  132.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  133.     private ?\DateTimeInterface $acceptedZfssDate null;
  134.     #[ORM\OneToMany(mappedBy'consultant'targetEntityLeaveRequestBalance::class)]
  135.     private Collection $leaveRequestBalances;
  136.     public function __construct()
  137.     {
  138.         $this->orders = new ArrayCollection();
  139.         $this->customers = new ArrayCollection();
  140.         $this->notifications = new ArrayCollection();
  141.         $this->orderNotes = new ArrayCollection();
  142.         $this->dividedOrders = new ArrayCollection();
  143.         $this->orderHistories = new ArrayCollection();
  144.         $this->consultantRewards = new ArrayCollection();
  145.         $this->commercialOffers = new ArrayCollection();
  146.         $this->workHistories = new ArrayCollection();
  147.         $this->commercialOfferIndividuals = new ArrayCollection();
  148.         $this->commercialOfferSendings = new ArrayCollection();
  149.         $this->directMessagesSent = new ArrayCollection();
  150.         $this->directMessagesReceived = new ArrayCollection();
  151.         $this->reservations = new ArrayCollection();
  152.         $this->debtNotes = new ArrayCollection();
  153.         $this->customerHistories = new ArrayCollection();
  154.         $this->awards = new ArrayCollection();
  155.         $this->awardPtSums = new ArrayCollection();
  156.         $this->awardsDraws = new ArrayCollection();
  157.         $this->inAwards true;
  158.         $this->ordersToNotes = new ArrayCollection();
  159.         $this->smsHistories = new ArrayCollection();
  160.         $this->workTimes = new ArrayCollection();
  161.         $this->leaveRequests = new ArrayCollection();
  162.         $this->entityChangeLogs = new ArrayCollection();
  163.         $this->surveyResponses = new ArrayCollection();
  164.         $this->position null;
  165.         $this->zoomLists = new ArrayCollection();
  166.         $this->accountingOfficeSendingNotes = new ArrayCollection();
  167.         $this->acceptedZfss false;
  168.         $this->acceptedZfssDate null;
  169.         $this->leaveRequestBalances = new ArrayCollection();
  170.     }
  171.     public function __toString()
  172.     {
  173.         return $this->firstName.' '.$this->lastName;
  174.     }
  175.     public function getId(): ?int
  176.     {
  177.         return $this->id;
  178.     }
  179.     public function getFullName(): ?string
  180.     {
  181.         return $this->lastName.' '.$this->firstName;
  182.     }
  183.     public function getFirstName(): ?string
  184.     {
  185.         return $this->firstName;
  186.     }
  187.     public function setFirstName(string $firstName): self
  188.     {
  189.         $this->firstName $firstName;
  190.         return $this;
  191.     }
  192.     public function getLastName(): ?string
  193.     {
  194.         return $this->lastName;
  195.     }
  196.     public function setLastName(string $lastName): self
  197.     {
  198.         $this->lastName $lastName;
  199.         return $this;
  200.     }
  201.     public function getEmail(): ?string
  202.     {
  203.         return $this->email;
  204.     }
  205.     public function setEmail(?string $email): self
  206.     {
  207.         $this->email $email;
  208.         return $this;
  209.     }
  210.     public function getPhone(): ?string
  211.     {
  212.         return $this->phone;
  213.     }
  214.     public function setPhone(?string $phone): self
  215.     {
  216.         $this->phone $phone;
  217.         return $this;
  218.     }
  219.     public function getPhoto(): ?string
  220.     {
  221.         return $this->photo;
  222.     }
  223.     public function setPhoto(?string $photo): self
  224.     {
  225.         $this->photo $photo;
  226.         return $this;
  227.     }
  228.     public function isActive(): ?bool
  229.     {
  230.         return $this->isActive;
  231.     }
  232.     public function setIsActive(bool $isActive): self
  233.     {
  234.         $this->isActive $isActive;
  235.         return $this;
  236.     }
  237.     /**
  238.      * A visual identifier that represents this user.
  239.      *
  240.      * @see UserInterface
  241.      */
  242.     public function getUserIdentifier(): string
  243.     {
  244.         return (string) $this->email;
  245.     }
  246.     /**
  247.      * @see UserInterface
  248.      */
  249.     public function getRoles(): array
  250.     {
  251.         $roles $this->roles;
  252.         // guarantee every user at least has ROLE_USER
  253.         $roles[] = 'ROLE_CONSULTANT';
  254.         return array_unique($roles);
  255.     }
  256.     /**
  257.      * @see UserInterface
  258.      */
  259.     public function eraseCredentials()
  260.     {
  261.         // If you store any temporary, sensitive data on the user, clear it here
  262.         // $this->plainPassword = null;
  263.     }
  264.     public function setRoles(array $roles): self
  265.     {
  266.         $this->roles $roles;
  267.         return $this;
  268.     }
  269.     public function getPassword(): ?string
  270.     {
  271.         return $this->password;
  272.     }
  273.     public function setPassword(string $password): self
  274.     {
  275.         $this->password $password;
  276.         return $this;
  277.     }
  278.     public function getDepartment(): ?department
  279.     {
  280.         return $this->department;
  281.     }
  282.     public function setDepartment(?department $department): self
  283.     {
  284.         $this->department $department;
  285.         return $this;
  286.     }
  287.     /**
  288.      * @return Collection<int, Order>
  289.      */
  290.     public function getOrders(): Collection
  291.     {
  292.         return $this->orders;
  293.     }
  294.     public function addOrder(Order $order): self
  295.     {
  296.         if (!$this->orders->contains($order)) {
  297.             $this->orders->add($order);
  298.             $order->setConsultant($this);
  299.         }
  300.         return $this;
  301.     }
  302.     public function removeOrder(Order $order): self
  303.     {
  304.         if ($this->orders->removeElement($order)) {
  305.             // set the owning side to null (unless already changed)
  306.             if ($order->getConsultant() === $this) {
  307.                 $order->setConsultant(null);
  308.             }
  309.         }
  310.         return $this;
  311.     }
  312.     /**
  313.      * @return Collection<int, Customer>
  314.      */
  315.     public function getCustomers(): Collection
  316.     {
  317.         return $this->customers;
  318.     }
  319.     public function addCustomer(Customer $customer): static
  320.     {
  321.         if (!$this->customers->contains($customer)) {
  322.             $this->customers->add($customer);
  323.             $customer->setConsultant($this);
  324.         }
  325.         return $this;
  326.     }
  327.     public function removeCustomer(Customer $customer): static
  328.     {
  329.         if ($this->customers->removeElement($customer)) {
  330.             // set the owning side to null (unless already changed)
  331.             if ($customer->getConsultant() === $this) {
  332.                 $customer->setConsultant(null);
  333.             }
  334.         }
  335.         return $this;
  336.     }
  337.     /**
  338.      * @return Collection<int, Notification>
  339.      */
  340.     public function getNotifications(): Collection
  341.     {
  342.         return $this->notifications;
  343.     }
  344.     public function addNotification(Notification $notification): static
  345.     {
  346.         if (!$this->notifications->contains($notification)) {
  347.             $this->notifications->add($notification);
  348.             $notification->addConsultant($this);
  349.         }
  350.         return $this;
  351.     }
  352.     public function removeNotification(Notification $notification): static
  353.     {
  354.         if ($this->notifications->removeElement($notification)) {
  355.             $notification->removeConsultant($this);
  356.         }
  357.         return $this;
  358.     }
  359.     /**
  360.      * @return Collection<int, OrderNote>
  361.      */
  362.     public function getOrderNotes(): Collection
  363.     {
  364.         return $this->orderNotes;
  365.     }
  366.     public function addOrderNote(OrderNote $orderNote): static
  367.     {
  368.         if (!$this->orderNotes->contains($orderNote)) {
  369.             $this->orderNotes->add($orderNote);
  370.             $orderNote->setConsultant($this);
  371.         }
  372.         return $this;
  373.     }
  374.     public function removeOrderNote(OrderNote $orderNote): static
  375.     {
  376.         if ($this->orderNotes->removeElement($orderNote)) {
  377.             // set the owning side to null (unless already changed)
  378.             if ($orderNote->getConsultant() === $this) {
  379.                 $orderNote->setConsultant(null);
  380.             }
  381.         }
  382.         return $this;
  383.     }
  384.     /**
  385.      * @return Collection<int, Order>
  386.      */
  387.     public function getDividedOrders(): Collection
  388.     {
  389.         return $this->dividedOrders;
  390.     }
  391.     public function addDividedOrder(Order $dividedOrder): static
  392.     {
  393.         if (!$this->dividedOrders->contains($dividedOrder)) {
  394.             $this->dividedOrders->add($dividedOrder);
  395.             $dividedOrder->setOrderDividedConsultant($this);
  396.         }
  397.         return $this;
  398.     }
  399.     public function removeDividedOrder(Order $dividedOrder): static
  400.     {
  401.         if ($this->dividedOrders->removeElement($dividedOrder)) {
  402.             // set the owning side to null (unless already changed)
  403.             if ($dividedOrder->getOrderDividedConsultant() === $this) {
  404.                 $dividedOrder->setOrderDividedConsultant(null);
  405.             }
  406.         }
  407.         return $this;
  408.     }
  409.     /**
  410.      * @return Collection<int, OrderHistory>
  411.      */
  412.     public function getOrderHistories(): Collection
  413.     {
  414.         return $this->orderHistories;
  415.     }
  416.     public function addOrderHistory(OrderHistory $orderHistory): static
  417.     {
  418.         if (!$this->orderHistories->contains($orderHistory)) {
  419.             $this->orderHistories->add($orderHistory);
  420.             $orderHistory->setConsultant($this);
  421.         }
  422.         return $this;
  423.     }
  424.     public function removeOrderHistory(OrderHistory $orderHistory): static
  425.     {
  426.         if ($this->orderHistories->removeElement($orderHistory)) {
  427.             // set the owning side to null (unless already changed)
  428.             if ($orderHistory->getConsultant() === $this) {
  429.                 $orderHistory->setConsultant(null);
  430.             }
  431.         }
  432.         return $this;
  433.     }
  434.     public function getBonusPercentage(): ?int
  435.     {
  436.         return $this->bonusPercentage;
  437.     }
  438.     public function setBonusPercentage(int $bonusPercentage): static
  439.     {
  440.         $this->bonusPercentage $bonusPercentage;
  441.         return $this;
  442.     }
  443.     /**
  444.      * @return Collection<int, ConsultantReward>
  445.      */
  446.     public function getConsultantRewards(): Collection
  447.     {
  448.         return $this->consultantRewards;
  449.     }
  450.     public function addConsultantReward(ConsultantReward $consultantReward): static
  451.     {
  452.         if (!$this->consultantRewards->contains($consultantReward)) {
  453.             $this->consultantRewards->add($consultantReward);
  454.             $consultantReward->setConsultant($this);
  455.         }
  456.         return $this;
  457.     }
  458.     public function removeConsultantReward(ConsultantReward $consultantReward): static
  459.     {
  460.         if ($this->consultantRewards->removeElement($consultantReward)) {
  461.             // set the owning side to null (unless already changed)
  462.             if ($consultantReward->getConsultant() === $this) {
  463.                 $consultantReward->setConsultant(null);
  464.             }
  465.         }
  466.         return $this;
  467.     }
  468.     /**
  469.      * @return Collection<int, CommercialOffer>
  470.      */
  471.     public function getCommercialOffers(): Collection
  472.     {
  473.         return $this->commercialOffers;
  474.     }
  475.     public function addCommercialOffer(CommercialOffer $commercialOffer): static
  476.     {
  477.         if (!$this->commercialOffers->contains($commercialOffer)) {
  478.             $this->commercialOffers->add($commercialOffer);
  479.             $commercialOffer->addAvailableForConsultant($this);
  480.         }
  481.         return $this;
  482.     }
  483.     public function removeCommercialOffer(CommercialOffer $commercialOffer): static
  484.     {
  485.         if ($this->commercialOffers->removeElement($commercialOffer)) {
  486.             $commercialOffer->removeAvailableForConsultant($this);
  487.         }
  488.         return $this;
  489.     }
  490.     /**
  491.      * @return Collection<int, WorkHistory>
  492.      */
  493.     public function getWorkHistories(): Collection
  494.     {
  495.         return $this->workHistories;
  496.     }
  497.     public function addWorkHistory(WorkHistory $workHistory): static
  498.     {
  499.         if (!$this->workHistories->contains($workHistory)) {
  500.             $this->workHistories->add($workHistory);
  501.             $workHistory->setConsultant($this);
  502.         }
  503.         return $this;
  504.     }
  505.     public function removeWorkHistory(WorkHistory $workHistory): static
  506.     {
  507.         if ($this->workHistories->removeElement($workHistory)) {
  508.             // set the owning side to null (unless already changed)
  509.             if ($workHistory->getConsultant() === $this) {
  510.                 $workHistory->setConsultant(null);
  511.             }
  512.         }
  513.         return $this;
  514.     }
  515.     /**
  516.      * @return Collection<int, CommercialOfferIndividual>
  517.      */
  518.     public function getIndividualCommercialOffers(): Collection
  519.     {
  520.         return $this->commercialOfferIndividuals;
  521.     }
  522.     public function addIndividualCommercialOffer(CommercialOfferIndividual $commercialOfferIndividual): static
  523.     {
  524.         if (!$this->commercialOfferIndividuals->contains($commercialOfferIndividual)) {
  525.             $this->commercialOfferIndividuals->add($commercialOfferIndividual);
  526.             $commercialOfferIndividual->setCreatedByConsultant($this);
  527.         }
  528.         return $this;
  529.     }
  530.     public function removeIndividualCommercialOffer(CommercialOfferIndividual $commercialOfferIndividual): static
  531.     {
  532.         if ($this->commercialOfferIndividuals->removeElement($commercialOfferIndividual)) {
  533.             // set the owning side to null (unless already changed)
  534.             if ($commercialOfferIndividual->getCreatedByConsultant() === $this) {
  535.                 $commercialOfferIndividual->setCreatedByConsultant(null);
  536.             }
  537.         }
  538.         return $this;
  539.     }
  540.     /**
  541.      * @return Collection<int, CommercialOfferSendings>
  542.      */
  543.     public function getCommercialOfferSendings(): Collection
  544.     {
  545.         return $this->commercialOfferSendings;
  546.     }
  547.     public function addCommercialOfferSending(CommercialOfferSendings $commercialOfferSending): static
  548.     {
  549.         if (!$this->commercialOfferSendings->contains($commercialOfferSending)) {
  550.             $this->commercialOfferSendings->add($commercialOfferSending);
  551.             $commercialOfferSending->setAddedByConsultant($this);
  552.         }
  553.         return $this;
  554.     }
  555.     public function removeCommercialOfferSending(CommercialOfferSendings $commercialOfferSending): static
  556.     {
  557.         if ($this->commercialOfferSendings->removeElement($commercialOfferSending)) {
  558.             // set the owning side to null (unless already changed)
  559.             if ($commercialOfferSending->getAddedByConsultant() === $this) {
  560.                 $commercialOfferSending->setAddedByConsultant(null);
  561.             }
  562.         }
  563.         return $this;
  564.     }
  565.     /**
  566.      * @return Collection<int, DirectMessage>
  567.      */
  568.     public function getDirectMessagesSent(): Collection
  569.     {
  570.         return $this->directMessagesSent;
  571.     }
  572.     public function addDirectMessagesSent(DirectMessage $directMessagesSent): static
  573.     {
  574.         if (!$this->directMessagesSent->contains($directMessagesSent)) {
  575.             $this->directMessagesSent->add($directMessagesSent);
  576.             $directMessagesSent->setSenderConsultant($this);
  577.         }
  578.         return $this;
  579.     }
  580.     public function removeDirectMessagesSent(DirectMessage $directMessagesSent): static
  581.     {
  582.         if ($this->directMessagesSent->removeElement($directMessagesSent)) {
  583.             // set the owning side to null (unless already changed)
  584.             if ($directMessagesSent->getSenderConsultant() === $this) {
  585.                 $directMessagesSent->setSenderConsultant(null);
  586.             }
  587.         }
  588.         return $this;
  589.     }
  590.     /**
  591.      * @return Collection<int, DirectMessage>
  592.      */
  593.     public function getDirectMessagesReceived(): Collection
  594.     {
  595.         return $this->directMessagesReceived;
  596.     }
  597.     public function addDirectMessagesReceived(DirectMessage $directMessagesReceived): static
  598.     {
  599.         if (!$this->directMessagesReceived->contains($directMessagesReceived)) {
  600.             $this->directMessagesReceived->add($directMessagesReceived);
  601.             $directMessagesReceived->setReceiverConsultant($this);
  602.         }
  603.         return $this;
  604.     }
  605.     public function removeDirectMessagesReceived(DirectMessage $directMessagesReceived): static
  606.     {
  607.         if ($this->directMessagesReceived->removeElement($directMessagesReceived)) {
  608.             // set the owning side to null (unless already changed)
  609.             if ($directMessagesReceived->getReceiverConsultant() === $this) {
  610.                 $directMessagesReceived->setReceiverConsultant(null);
  611.             }
  612.         }
  613.         return $this;
  614.     }
  615.     public function isRemoteAccess(): ?bool
  616.     {
  617.         return $this->remoteAccess;
  618.     }
  619.     public function setRemoteAccess(bool $remoteAccess): static
  620.     {
  621.         $this->remoteAccess $remoteAccess;
  622.         return $this;
  623.     }
  624.     /**
  625.      * @return Collection<int, Reservations>
  626.      */
  627.     public function getReservations(): Collection
  628.     {
  629.         return $this->reservations;
  630.     }
  631.     public function addReservation(Reservations $reservation): static
  632.     {
  633.         if (!$this->reservations->contains($reservation)) {
  634.             $this->reservations->add($reservation);
  635.             $reservation->setAddedByConsultant($this);
  636.         }
  637.         return $this;
  638.     }
  639.     public function removeReservation(Reservations $reservation): static
  640.     {
  641.         if ($this->reservations->removeElement($reservation)) {
  642.             // set the owning side to null (unless already changed)
  643.             if ($reservation->getAddedByConsultant() === $this) {
  644.                 $reservation->setAddedByConsultant(null);
  645.             }
  646.         }
  647.         return $this;
  648.     }
  649.     public function getColor(): ?string
  650.     {
  651.         return $this->color;
  652.     }
  653.     public function setColor(?string $color): static
  654.     {
  655.         $this->color $color;
  656.         return $this;
  657.     }
  658.     /**
  659.      * @return Collection<int, DebtNote>
  660.      */
  661.     public function getDebtNotes(): Collection
  662.     {
  663.         return $this->debtNotes;
  664.     }
  665.     public function addDebtNote(DebtNote $debtNote): static
  666.     {
  667.         if (!$this->debtNotes->contains($debtNote)) {
  668.             $this->debtNotes->add($debtNote);
  669.             $debtNote->setConsultant($this);
  670.         }
  671.         return $this;
  672.     }
  673.     public function removeDebtNote(DebtNote $debtNote): static
  674.     {
  675.         if ($this->debtNotes->removeElement($debtNote)) {
  676.             // set the owning side to null (unless already changed)
  677.             if ($debtNote->getConsultant() === $this) {
  678.                 $debtNote->setConsultant(null);
  679.             }
  680.         }
  681.         return $this;
  682.     }
  683.     public function getOrderDivideds(): Collection
  684.     {
  685.         return $this->orderDivideds;
  686.     }
  687.     public function setOrderDivideds(Collection $orderDivideds): void
  688.     {
  689.         $this->orderDivideds $orderDivideds;
  690.     }
  691.     public function removeOrderDivided(OrderDivided $orderDivided): static
  692.     {
  693.         if ($this->orderDivideds->removeElement($orderDivided)) {
  694.             // set the owning side to null (unless already changed)
  695.             if ($orderDivided->getConsultant() === $this) {
  696.                 $orderDivided->setConsultant(null);
  697.             }
  698.         }
  699.         return $this;
  700.     }
  701.     /**
  702.      * @return Collection<int, CustomerHistory>
  703.      */
  704.     public function getCustomerHistories(): Collection
  705.     {
  706.         return $this->customerHistories;
  707.     }
  708.     public function addCustomerHistory(CustomerHistory $customerHistory): static
  709.     {
  710.         if (!$this->customerHistories->contains($customerHistory)) {
  711.             $this->customerHistories->add($customerHistory);
  712.             $customerHistory->setConsultant($this);
  713.         }
  714.         return $this;
  715.     }
  716.     public function removeCustomerHistory(CustomerHistory $customerHistory): static
  717.     {
  718.         if ($this->customerHistories->removeElement($customerHistory)) {
  719.             // set the owning side to null (unless already changed)
  720.             if ($customerHistory->getConsultant() === $this) {
  721.                 $customerHistory->setConsultant(null);
  722.             }
  723.         }
  724.         return $this;
  725.     }
  726.     /**
  727.      * @return Collection<int, Awards>
  728.      */
  729.     public function getAwards(): Collection
  730.     {
  731.         return $this->awards;
  732.     }
  733.     public function addAward(Awards $award): static
  734.     {
  735.         if (!$this->awards->contains($award)) {
  736.             $this->awards->add($award);
  737.             $award->setConsultant($this);
  738.         }
  739.         return $this;
  740.     }
  741.     public function removeAward(Awards $award): static
  742.     {
  743.         if ($this->awards->removeElement($award)) {
  744.             // set the owning side to null (unless already changed)
  745.             if ($award->getConsultant() === $this) {
  746.                 $award->setConsultant(null);
  747.             }
  748.         }
  749.         return $this;
  750.     }
  751.     public function getAwardLeague(): ?AwardLeague
  752.     {
  753.         return $this->awardLeague;
  754.     }
  755.     public function setAwardLeague(?AwardLeague $awardLeague): static
  756.     {
  757.         $this->awardLeague $awardLeague;
  758.         return $this;
  759.     }
  760.     /**
  761.      * @return Collection<int, AwardPtSum>
  762.      */
  763.     public function getAwardPtSums(): Collection
  764.     {
  765.         return $this->awardPtSums;
  766.     }
  767.     public function addAwardPtSum(AwardPtSum $awardPtSum): static
  768.     {
  769.         if (!$this->awardPtSums->contains($awardPtSum)) {
  770.             $this->awardPtSums->add($awardPtSum);
  771.             $awardPtSum->setConsultant($this);
  772.         }
  773.         return $this;
  774.     }
  775.     public function removeAwardPtSum(AwardPtSum $awardPtSum): static
  776.     {
  777.         if ($this->awardPtSums->removeElement($awardPtSum)) {
  778.             // set the owning side to null (unless already changed)
  779.             if ($awardPtSum->getConsultant() === $this) {
  780.                 $awardPtSum->setConsultant(null);
  781.             }
  782.         }
  783.         return $this;
  784.     }
  785.     /**
  786.      * @return Collection<int, AwardsDraw>
  787.      */
  788.     public function getAwardsDraws(): Collection
  789.     {
  790.         return $this->awardsDraws;
  791.     }
  792.     public function addAwardsDraw(AwardsDraw $awardsDraw): static
  793.     {
  794.         if (!$this->awardsDraws->contains($awardsDraw)) {
  795.             $this->awardsDraws->add($awardsDraw);
  796.             $awardsDraw->setConsultant($this);
  797.         }
  798.         return $this;
  799.     }
  800.     public function removeAwardsDraw(AwardsDraw $awardsDraw): static
  801.     {
  802.         if ($this->awardsDraws->removeElement($awardsDraw)) {
  803.             // set the owning side to null (unless already changed)
  804.             if ($awardsDraw->getConsultant() === $this) {
  805.                 $awardsDraw->setConsultant(null);
  806.             }
  807.         }
  808.         return $this;
  809.     }
  810.     public function isInAwards(): bool
  811.     {
  812.         return $this->inAwards;
  813.     }
  814.     public function setInAwards(bool $inAwards): static
  815.     {
  816.         $this->inAwards $inAwards;
  817.         return $this;
  818.     }
  819.     /**
  820.      * @return Collection<int, Order>
  821.      */
  822.     public function getOrdersToNotes(): Collection
  823.     {
  824.         return $this->ordersToNotes;
  825.     }
  826.     public function addOrdersToNote(Order $ordersToNote): static
  827.     {
  828.         if (!$this->ordersToNotes->contains($ordersToNote)) {
  829.             $this->ordersToNotes->add($ordersToNote);
  830.             $ordersToNote->addConsultantForNote($this);
  831.         }
  832.         return $this;
  833.     }
  834.     public function removeOrdersToNote(Order $ordersToNote): static
  835.     {
  836.         if ($this->ordersToNotes->removeElement($ordersToNote)) {
  837.             $ordersToNote->removeConsultantForNote($this);
  838.         }
  839.         return $this;
  840.     }
  841.     /**
  842.      * @return Collection<int, SmsHistory>
  843.      */
  844.     public function getSmsHistories(): Collection
  845.     {
  846.         return $this->smsHistories;
  847.     }
  848.     public function addSmsHistory(SmsHistory $smsHistory): static
  849.     {
  850.         if (!$this->smsHistories->contains($smsHistory)) {
  851.             $this->smsHistories->add($smsHistory);
  852.             $smsHistory->setSendByConsultant($this);
  853.         }
  854.         return $this;
  855.     }
  856.     public function removeSmsHistory(SmsHistory $smsHistory): static
  857.     {
  858.         if ($this->smsHistories->removeElement($smsHistory)) {
  859.             // set the owning side to null (unless already changed)
  860.             if ($smsHistory->getSendByConsultant() === $this) {
  861.                 $smsHistory->setSendByConsultant(null);
  862.             }
  863.         }
  864.         return $this;
  865.     }
  866.     public function getNominalWorkTime(): ?NominalWorkTime
  867.     {
  868.         return $this->nominalWorkTime;
  869.     }
  870.     public function setNominalWorkTime(?NominalWorkTime $nominalWorkTime): static
  871.     {
  872.         // unset the owning side of the relation if necessary
  873.         if ($nominalWorkTime === null && $this->nominalWorkTime !== null) {
  874.             $this->nominalWorkTime->setConsultant(null);
  875.         }
  876.         // set the owning side of the relation if necessary
  877.         if ($nominalWorkTime !== null && $nominalWorkTime->getConsultant() !== $this) {
  878.             $nominalWorkTime->setConsultant($this);
  879.         }
  880.         $this->nominalWorkTime $nominalWorkTime;
  881.         return $this;
  882.     }
  883.     /**
  884.      * @return Collection<int, WorkTime>
  885.      */
  886.     public function getWorkTimes(): Collection
  887.     {
  888.         return $this->workTimes;
  889.     }
  890.     public function addWorkTime(WorkTime $workTime): static
  891.     {
  892.         if (!$this->workTimes->contains($workTime)) {
  893.             $this->workTimes->add($workTime);
  894.             $workTime->setConsultant($this);
  895.         }
  896.         return $this;
  897.     }
  898.     public function removeWorkTime(WorkTime $workTime): static
  899.     {
  900.         if ($this->workTimes->removeElement($workTime)) {
  901.             // set the owning side to null (unless already changed)
  902.             if ($workTime->getConsultant() === $this) {
  903.                 $workTime->setConsultant(null);
  904.             }
  905.         }
  906.         return $this;
  907.     }
  908.     public function isRemoteWork(): ?bool
  909.     {
  910.         return $this->remoteWork;
  911.     }
  912.     public function setRemoteWork(bool $remoteWork): static
  913.     {
  914.         $this->remoteWork $remoteWork;
  915.         return $this;
  916.     }
  917.     /**
  918.      * @return Collection<int, LeaveRequest>
  919.      */
  920.     public function getLeaveRequests(): Collection
  921.     {
  922.         return $this->leaveRequests;
  923.     }
  924.     public function addLeaveRequest(LeaveRequest $leaveRequest): static
  925.     {
  926.         if (!$this->leaveRequests->contains($leaveRequest)) {
  927.             $this->leaveRequests->add($leaveRequest);
  928.             $leaveRequest->setConsultant($this);
  929.         }
  930.         return $this;
  931.     }
  932.     public function removeLeaveRequest(LeaveRequest $leaveRequest): static
  933.     {
  934.         if ($this->leaveRequests->removeElement($leaveRequest)) {
  935.             // set the owning side to null (unless already changed)
  936.             if ($leaveRequest->getConsultant() === $this) {
  937.                 $leaveRequest->setConsultant(null);
  938.             }
  939.         }
  940.         return $this;
  941.     }
  942.     /**
  943.      * @return Collection<int, EntityChangeLog>
  944.      */
  945.     public function getEntityChangeLogs(): Collection
  946.     {
  947.         return $this->entityChangeLogs;
  948.     }
  949.     public function addEntityChangeLog(EntityChangeLog $entityChangeLog): static
  950.     {
  951.         if (!$this->entityChangeLogs->contains($entityChangeLog)) {
  952.             $this->entityChangeLogs->add($entityChangeLog);
  953.             $entityChangeLog->setChangedByConsultant($this);
  954.         }
  955.         return $this;
  956.     }
  957.     public function removeEntityChangeLog(EntityChangeLog $entityChangeLog): static
  958.     {
  959.         if ($this->entityChangeLogs->removeElement($entityChangeLog)) {
  960.             // set the owning side to null (unless already changed)
  961.             if ($entityChangeLog->getChangedByConsultant() === $this) {
  962.                 $entityChangeLog->setChangedByConsultant(null);
  963.             }
  964.         }
  965.         return $this;
  966.     }
  967.     /**
  968.      * @return Collection<int, SurveyResponse>
  969.      */
  970.     public function getSurveyResponses(): Collection
  971.     {
  972.         return $this->surveyResponses;
  973.     }
  974.     public function addSurveyResponse(SurveyResponse $surveyResponse): static
  975.     {
  976.         if (!$this->surveyResponses->contains($surveyResponse)) {
  977.             $this->surveyResponses->add($surveyResponse);
  978.             $surveyResponse->setMadeBy($this);
  979.         }
  980.         return $this;
  981.     }
  982.     public function removeSurveyResponse(SurveyResponse $surveyResponse): static
  983.     {
  984.         if ($this->surveyResponses->removeElement($surveyResponse)) {
  985.             // set the owning side to null (unless already changed)
  986.             if ($surveyResponse->getMadeBy() === $this) {
  987.                 $surveyResponse->setMadeBy(null);
  988.             }
  989.         }
  990.         return $this;
  991.     }
  992.     public function getPosition(): ?Position
  993.     {
  994.         return $this->position;
  995.     }
  996.     public function setPosition(?Position $position): static
  997.     {
  998.         $this->position $position;
  999.         return $this;
  1000.     }
  1001.     /**
  1002.      * @return Collection<int, ZoomList>
  1003.      */
  1004.     public function getZoomLists(): Collection
  1005.     {
  1006.         return $this->zoomLists;
  1007.     }
  1008.     public function addZoomList(ZoomList $zoomList): static
  1009.     {
  1010.         if (!$this->zoomLists->contains($zoomList)) {
  1011.             $this->zoomLists->add($zoomList);
  1012.             $zoomList->setConsultant($this);
  1013.         }
  1014.         return $this;
  1015.     }
  1016.     public function removeZoomList(ZoomList $zoomList): static
  1017.     {
  1018.         if ($this->zoomLists->removeElement($zoomList)) {
  1019.             // set the owning side to null (unless already changed)
  1020.             if ($zoomList->getConsultant() === $this) {
  1021.                 $zoomList->setConsultant(null);
  1022.             }
  1023.         }
  1024.         return $this;
  1025.     }
  1026.     public function getConsultantContractType(): ?EmploymentContractType
  1027.     {
  1028.         return $this->consultantContractType;
  1029.     }
  1030.     public function setConsultantContractType(?EmploymentContractType $consultantContractType): static
  1031.     {
  1032.         $this->consultantContractType $consultantContractType;
  1033.         return $this;
  1034.     }
  1035.     /**
  1036.      * @return Collection<int, AccountingOfficeSendingNote>
  1037.      */
  1038.     public function getAccountingOfficeSendingNotes(): Collection
  1039.     {
  1040.         return $this->accountingOfficeSendingNotes;
  1041.     }
  1042.     public function addAccountingOfficeSendingNote(AccountingOfficeSendingNote $accountingOfficeSendingNote): static
  1043.     {
  1044.         if (!$this->accountingOfficeSendingNotes->contains($accountingOfficeSendingNote)) {
  1045.             $this->accountingOfficeSendingNotes->add($accountingOfficeSendingNote);
  1046.             $accountingOfficeSendingNote->setConsultant($this);
  1047.         }
  1048.         return $this;
  1049.     }
  1050.     public function removeAccountingOfficeSendingNote(AccountingOfficeSendingNote $accountingOfficeSendingNote): static
  1051.     {
  1052.         if ($this->accountingOfficeSendingNotes->removeElement($accountingOfficeSendingNote)) {
  1053.             // set the owning side to null (unless already changed)
  1054.             if ($accountingOfficeSendingNote->getConsultant() === $this) {
  1055.                 $accountingOfficeSendingNote->setConsultant(null);
  1056.             }
  1057.         }
  1058.         return $this;
  1059.     }
  1060.     public function isAcceptedRegulations(): ?bool
  1061.     {
  1062.         return $this->acceptedRegulations;
  1063.     }
  1064.     public function setAcceptedRegulations(bool $acceptedRegulations): static
  1065.     {
  1066.         $this->acceptedRegulations $acceptedRegulations;
  1067.         return $this;
  1068.     }
  1069.     public function getAcceptedRegulationsDate(): ?\DateTimeInterface
  1070.     {
  1071.         return $this->acceptedRegulationsDate;
  1072.     }
  1073.     public function setAcceptedRegulationsDate(?\DateTimeInterface $acceptedRegulationsDate): static
  1074.     {
  1075.         $this->acceptedRegulationsDate $acceptedRegulationsDate;
  1076.         return $this;
  1077.     }
  1078.     public function isAcceptedZfss(): ?bool
  1079.     {
  1080.         return $this->acceptedZfss;
  1081.     }
  1082.     public function setAcceptedZfss(bool $acceptedZfss): static
  1083.     {
  1084.         $this->acceptedZfss $acceptedZfss;
  1085.         return $this;
  1086.     }
  1087.     public function getAcceptedZfssDate(): ?\DateTimeInterface
  1088.     {
  1089.         return $this->acceptedZfssDate;
  1090.     }
  1091.     public function setAcceptedZfssDate(\DateTimeInterface $acceptedZfssDate): static
  1092.     {
  1093.         $this->acceptedZfssDate $acceptedZfssDate;
  1094.         return $this;
  1095.     }
  1096.     /**
  1097.      * @return Collection<int, LeaveRequestBalance>
  1098.      */
  1099.     public function getLeaveRequestBalances(): Collection
  1100.     {
  1101.         return $this->leaveRequestBalances;
  1102.     }
  1103.     public function addLeaveRequestBalance(LeaveRequestBalance $leaveRequestBalance): static
  1104.     {
  1105.         if (!$this->leaveRequestBalances->contains($leaveRequestBalance)) {
  1106.             $this->leaveRequestBalances->add($leaveRequestBalance);
  1107.             $leaveRequestBalance->setConsultant($this);
  1108.         }
  1109.         return $this;
  1110.     }
  1111.     public function removeLeaveRequestBalance(LeaveRequestBalance $leaveRequestBalance): static
  1112.     {
  1113.         if ($this->leaveRequestBalances->removeElement($leaveRequestBalance)) {
  1114.             // set the owning side to null (unless already changed)
  1115.             if ($leaveRequestBalance->getConsultant() === $this) {
  1116.                 $leaveRequestBalance->setConsultant(null);
  1117.             }
  1118.         }
  1119.         return $this;
  1120.     }
  1121. }