src/Entity/CRM/Admin.php line 30

  1. <?php
  2. namespace App\Entity\CRM;
  3. use App\Entity\CRM\Notification;
  4. use App\Entity\CRM\NotificationToSendSetting;
  5. use App\Entity\CRM\Order;
  6. use App\Entity\CRM\OrderHistory;
  7. use App\Entity\CRM\OrderNote;
  8. use App\Entity\CRM\Position;
  9. use App\Entity\CRM\Product;
  10. use App\Entity\CRM\Reservations;
  11. use App\Entity\CRM\SmsHistory;
  12. use App\Entity\CRM\Task;
  13. use App\Entity\CRM\Worker;
  14. use App\Entity\CRM\WorkHistory;
  15. use App\Repository\AdminRepository;
  16. use Doctrine\Common\Collections\ArrayCollection;
  17. use Doctrine\Common\Collections\Collection;
  18. use Doctrine\DBAL\Types\Types;
  19. use Doctrine\ORM\Mapping as ORM;
  20. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  21. use Symfony\Component\Security\Core\User\EquatableInterface;
  22. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  23. use Symfony\Component\Security\Core\User\UserInterface;
  24. #[ORM\Entity(repositoryClassAdminRepository::class)]
  25. #[ORM\Table(name'`admin`')]
  26. #[UniqueEntity(fields: ['email'], message'Konto o takim adresie email już istnieje')]
  27. class Admin implements UserInterfacePasswordAuthenticatedUserInterfaceEquatableInterface
  28. {
  29.     #[ORM\Id]
  30.     #[ORM\GeneratedValue]
  31.     #[ORM\Column]
  32.     private ?int $id null;
  33.     #[ORM\Column(length180uniquetrue)]
  34.     private ?string $email null;
  35.     #[ORM\Column(type"string"nullablefalse)]
  36.     private string $firstName;
  37.     #[ORM\Column(type"string"nullablefalse)]
  38.     private string $lastName;
  39.     #[ORM\Column(type"boolean"nullablefalse)]
  40.     private bool $isActive true;
  41.     #[ORM\Column]
  42.     private array $roles = [];
  43.     /**
  44.      * @var string The hashed password
  45.      */
  46.     #[ORM\Column]
  47.     private string $password;
  48.     #[ORM\ManyToMany(targetEntityBranch::class, inversedBy'admins')]
  49.     #[ORM\JoinColumn(nullablefalse)]
  50.     private Collection $branches;
  51.     #[ORM\OneToOne(mappedBy'admin')]
  52.     private ?Worker $worker null;
  53.     #[ORM\OneToOne(mappedBy'admin'cascade: ['persist''remove'])]
  54.     private ?Implementer $implementer null;
  55.     #[ORM\OneToMany(mappedBy'admin'targetEntityOrderHistory::class)]
  56.     private Collection $orderHistories;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $color null;
  59.     #[ORM\ManyToMany(targetEntityNotification::class, mappedBy'admin')]
  60.     private Collection $notifications;
  61.     #[ORM\Column(length6nullabletrue)]
  62.     private ?string $adminCode;
  63.     #[ORM\OneToMany(mappedBy'admin'targetEntityOrderNote::class)]
  64.     private Collection $orderNotes;
  65.     #[ORM\OneToMany(mappedBy'admin'targetEntityImplementerOrderHistory::class)]
  66.     private Collection $implementerOrderHistories;
  67.     #[ORM\OneToMany(mappedBy'lastEditedBy'targetEntityOrderNote::class)]
  68.     private Collection $orderEditedNotes;
  69.     #[ORM\OneToMany(mappedBy'admin'targetEntityOrder::class)]
  70.     private Collection $orders;
  71.     #[ORM\OneToMany(mappedBy'addedBy'targetEntityCommercialOffer::class)]
  72.     private Collection $commercialOffers;
  73.     #[ORM\OneToMany(mappedBy'admin'targetEntityWorkHistory::class)]
  74.     private Collection $workHistories;
  75.     #[ORM\OneToMany(mappedBy'createdByAdmin'targetEntityCommercialOfferIndividual::class)]
  76.     private Collection $commercialOfferIndividuals;
  77.     #[ORM\OneToMany(mappedBy'addedByAdmin'targetEntityCommercialOfferSendings::class)]
  78.     private Collection $commercialOfferSendings;
  79. //    #[ORM\OneToMany(mappedBy: 'acceptedBy', targetEntity: CommercialOfferSendings::class)]
  80. //    private Collection $commercialOfferSendingsAccepts;
  81. //
  82. //    #[ORM\OneToMany(mappedBy: 'acceptedBy', targetEntity: CommercialOfferIndividual::class)]
  83. //    private Collection $commercialOfferIndividualsAccepted;
  84.     #[ORM\OneToMany(mappedBy'addedByAdmin'targetEntityReservations::class)]
  85.     private Collection $reservations;
  86.     #[ORM\OneToMany(mappedBy'lastEditedBy'targetEntityReservations::class)]
  87.     private Collection $reservationsEdit;
  88.     #[ORM\OneToMany(mappedBy'senderAdmin'targetEntityDirectMessage::class)]
  89.     private Collection $directMessagesSent;
  90.     #[ORM\OneToMany(mappedBy'receiverAdmin'targetEntityDirectMessage::class)]
  91.     private Collection $directMessagesReceived;
  92.     #[ORM\Column]
  93.     private ?bool $remoteAccess null;
  94.     #[ORM\OneToMany(mappedBy'admin'targetEntityAdminNotificationSettings::class)]
  95.     private Collection $adminNotificationSettings;
  96.     #[ORM\OneToMany(mappedBy'admin'targetEntityDebtNote::class)]
  97.     private Collection $debtNotes;
  98.     #[ORM\OneToMany(mappedBy'admin'targetEntityCustomerHistory::class)]
  99.     private Collection $customerHistories;
  100.     #[ORM\Column(length255nullabletrue)]
  101.     private ?string $photo null;
  102.     #[ORM\Column]
  103.     private bool $sendMail true;
  104.     #[ORM\ManyToMany(targetEntityProduct::class, mappedBy'adminToInfo')]
  105.     private Collection $products;
  106.     #[ORM\OneToMany(mappedBy'sendByAdmin'targetEntitySmsHistory::class)]
  107.     private Collection $smsHistories;
  108.     #[ORM\ManyToMany(targetEntityNotificationToSendSetting::class, mappedBy'admin')]
  109.     private Collection $notificationToSendSettings;
  110.     #[ORM\OneToOne(mappedBy'admin'cascade: ['persist''remove'])]
  111.     private ?Mailbox $mailbox null;
  112.     #[ORM\OneToMany(mappedBy'acceptedBy'targetEntityLeaveRequest::class)]
  113.     private Collection $acceptedLeaveRequests;
  114.     #[ORM\OneToMany(mappedBy'rejectedBy'targetEntityLeaveRequest::class)]
  115.     private Collection $rejectedLeaveRequests;
  116.     #[ORM\OneToMany(mappedBy'acceptedBy'targetEntityTask::class)]
  117.     private Collection $acceptedTasks;
  118.     #[ORM\ManyToOne(inversedBy'admins')]
  119.     private ?Position $position null;
  120.     #[ORM\ManyToMany(targetEntityAgreement::class, mappedBy'agreementToSendAfterSigned')]
  121.     private Collection $agreementsToSendAfterSigned;
  122.     #[ORM\OneToOne(mappedBy'admin'cascade: ['persist''remove'])]
  123.     private ?NominalWorkTime $nominalWorkTime null;
  124.     #[ORM\Column]
  125.     private bool $toRcp true;
  126.     #[ORM\OneToMany(mappedBy'acceptedBy'targetEntityWorkTime::class)]
  127.     private Collection $acceptedWorkTimes;
  128.     #[ORM\OneToMany(mappedBy'admin'targetEntityAccountingOfficeSendingNote::class)]
  129.     private Collection $accountingOfficeSendingNotes;
  130.     #[ORM\OneToMany(mappedBy'admin'targetEntityWorkTime::class)]
  131.     private Collection $workTimes;
  132.     #[ORM\OneToMany(mappedBy'admin'targetEntityLeaveRequest::class)]
  133.     private Collection $leaveRequests;
  134.     #[ORM\ManyToMany(targetEntityDepartment::class, mappedBy'management')]
  135.     private Collection $departments;
  136.     #[ORM\OneToMany(mappedBy'addedBy'targetEntityNumberBlocking::class)]
  137.     private Collection $numberBlockings;
  138.     #[ORM\OneToMany(mappedBy'blockedBy'targetEntityNumberBlocking::class)]
  139.     private Collection $numberBlockingsBlocked;
  140.     #[ORM\ManyToOne(inversedBy'admins')]
  141.     private ?AdminDepartment $adminDepartment null;
  142.     #[ORM\Column]
  143.     private ?bool $acceptedRegulations null;
  144.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  145.     private ?\DateTimeInterface $acceptedRegulationsDate null;
  146.     #[ORM\Column]
  147.     private ?bool $acceptedZfss null;
  148.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  149.     private ?\DateTimeInterface $acceptedZfssDate null;
  150.     #[ORM\ManyToOne(inversedBy'admins')]
  151.     private ?EmploymentContractType $adminContractType null;
  152.     #[ORM\OneToMany(mappedBy'admin'targetEntityLeaveRequestBalance::class)]
  153.     private Collection $leaveRequestBalances;
  154.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  155.     private ?string $mailFooter null;
  156.     public function __construct()
  157.     {
  158.         $this->branches = new ArrayCollection();
  159.         $this->orderHistories = new ArrayCollection();
  160.         $this->notifications = new ArrayCollection();
  161.         $this->adminCode rand(000000999999);
  162.         $this->orderNotes = new ArrayCollection();
  163.         $this->implementerOrderHistories = new ArrayCollection();
  164.         $this->orderEditedNotes = new ArrayCollection();
  165.         $this->orders = new ArrayCollection();
  166.         $this->commercialOffers = new ArrayCollection();
  167.         $this->workHistories = new ArrayCollection();
  168.         $this->commercialOfferIndividuals = new ArrayCollection();
  169.         $this->commercialOfferSendings = new ArrayCollection();
  170.         $this->commercialOfferSendingsAccepts = new ArrayCollection();
  171.         $this->commercialOfferIndividualsAccepted = new ArrayCollection();
  172.         $this->reservations = new ArrayCollection();
  173.         $this->reservationsEdit = new ArrayCollection();
  174.         $this->directMessagesSent = new ArrayCollection();
  175.         $this->directMessagesReceived = new ArrayCollection();
  176.         $this->adminNotificationSettings = new ArrayCollection();
  177.         $this->debtNotes = new ArrayCollection();
  178.         $this->customerHistories = new ArrayCollection();
  179.         $this->products = new ArrayCollection();
  180.         $this->smsHistories = new ArrayCollection();
  181.         $this->notificationToSendSettings = new ArrayCollection();
  182.         $this->acceptedLeaveRequests = new ArrayCollection();
  183.         $this->rejectedLeaveRequests = new ArrayCollection();
  184.         $this->acceptedTasks = new ArrayCollection();
  185.         $this->position null;
  186.         $this->agreementsToSendAfterSigned = new ArrayCollection();
  187.         $this->acceptedWorkTimes = new ArrayCollection();
  188.         $this->accountingOfficeSendingNotes = new ArrayCollection();
  189.         $this->workTimes = new ArrayCollection();
  190.         $this->leaveRequests = new ArrayCollection();
  191.         $this->departments = new ArrayCollection();
  192.         $this->numberBlockings = new ArrayCollection();
  193.         $this->numberBlockingsBlocked = new ArrayCollection();
  194.         $this->acceptedZfss false;
  195.         $this->acceptedZfssDate null;
  196.         $this->leaveRequestBalances = new ArrayCollection();
  197.     }
  198.     public function __toString()
  199.     {
  200.         return $this->firstName ' ' $this->lastName;
  201.     }
  202.     public function getFullName(): ?string
  203.     {
  204.         return $this->lastName.' '.$this->firstName;
  205.     }
  206.     public function getId(): ?int
  207.     {
  208.         return $this->id;
  209.     }
  210.     public function getEmail(): ?string
  211.     {
  212.         return $this->email;
  213.     }
  214.     public function setEmail(string $email): self
  215.     {
  216.         $this->email $email;
  217.         return $this;
  218.     }
  219.     /**
  220.      * A visual identifier that represents this admin.
  221.      *
  222.      * @see UserInterface
  223.      */
  224.     public function getUserIdentifier(): string
  225.     {
  226.         return (string)$this->email;
  227.     }
  228.     /**
  229.      * @see UserInterface
  230.      */
  231.     public function getRoles(): array
  232.     {
  233.         $roles $this->roles;
  234.         // guarantee every user at least has ROLE_USER
  235.         $roles[] = 'ROLE_USER';
  236.         return array_unique($roles);
  237.     }
  238.     public function setRoles(array $roles): self
  239.     {
  240.         $this->roles $roles;
  241.         return $this;
  242.     }
  243.     /**
  244.      * @see PasswordAuthenticatedUserInterface
  245.      */
  246.     public function getPassword(): string
  247.     {
  248.         return $this->password;
  249.     }
  250.     public function setPassword(string $password): self
  251.     {
  252.         $this->password $password;
  253.         return $this;
  254.     }
  255.     /**
  256.      * @return string
  257.      */
  258.     public function getFirstName(): string
  259.     {
  260.         return $this->firstName;
  261.     }
  262.     /**
  263.      * @param string $firstName
  264.      */
  265.     public function setFirstName(string $firstName): void
  266.     {
  267.         $this->firstName $firstName;
  268.     }
  269.     /**
  270.      * @return string
  271.      */
  272.     public function getLastName(): string
  273.     {
  274.         return $this->lastName;
  275.     }
  276.     /**
  277.      * @param string $lastName
  278.      */
  279.     public function setLastName(string $lastName): void
  280.     {
  281.         $this->lastName $lastName;
  282.     }
  283.     /**
  284.      * @return bool
  285.      */
  286.     public function isActive(): bool
  287.     {
  288.         return $this->isActive;
  289.     }
  290.     /**
  291.      * @param bool $isActive
  292.      */
  293.     public function setIsActive(bool $isActive): void
  294.     {
  295.         $this->isActive $isActive;
  296.     }
  297.     /**
  298.      * @see UserInterface
  299.      */
  300.     public function eraseCredentials()
  301.     {
  302.         // If you store any temporary, sensitive data on the user, clear it here
  303.         // $this->plainPassword = null;
  304.     }
  305.     /**
  306.      * @return Collection
  307.      */
  308.     public function getBranches(): Collection
  309.     {
  310.         return $this->branches;
  311.     }
  312.     public function addBranch(Branch $branches): self
  313.     {
  314.         if (!$this->branches->contains($branches)) {
  315.             $this->branches[] = $branches;
  316.         }
  317.         return $this;
  318.     }
  319.     public function removeBranch(Branch $branches): self
  320.     {
  321.         $this->branches->removeElement($branches);
  322.         return $this;
  323.     }
  324.     public function getWorker(): ?Worker
  325.     {
  326.         return $this->worker;
  327.     }
  328.     public function setWorker(?Worker $worker): self
  329.     {
  330.         // unset the owning side of the relation if necessary
  331.         if ($worker === null && $this->worker !== null) {
  332.             $this->worker->setAdmin(null);
  333.         }
  334.         // set the owning side of the relation if necessary
  335.         if ($worker !== null && $worker->getAdmin() !== $this) {
  336.             $worker->setAdmin($this);
  337.         }
  338.         $this->worker $worker;
  339.         return $this;
  340.     }
  341.     public function getImplementer(): ?Implementer
  342.     {
  343.         return $this->implementer;
  344.     }
  345.     public function setImplementer(Implementer $implementer): self
  346.     {
  347.         // set the owning side of the relation if necessary
  348.         if ($implementer->getAdmin() !== $this) {
  349.             $implementer->setAdmin($this);
  350.         }
  351.         $this->implementer $implementer;
  352.         return $this;
  353.     }
  354.     /**
  355.      * @return Collection<int, OrderHistory>
  356.      */
  357.     public function getOrderHistories(): Collection
  358.     {
  359.         return $this->orderHistories;
  360.     }
  361.     public function addOrderHistory(OrderHistory $orderHistory): self
  362.     {
  363.         if (!$this->orderHistories->contains($orderHistory)) {
  364.             $this->orderHistories->add($orderHistory);
  365.             $orderHistory->setAdmin($this);
  366.         }
  367.         return $this;
  368.     }
  369.     public function removeOrderHistory(OrderHistory $orderHistory): self
  370.     {
  371.         if ($this->orderHistories->removeElement($orderHistory)) {
  372.             // set the owning side to null (unless already changed)
  373.             if ($orderHistory->getAdmin() === $this) {
  374.                 $orderHistory->setAdmin(null);
  375.             }
  376.         }
  377.         return $this;
  378.     }
  379.     // logs out the user when isActive status has been changed
  380.     public function isEqualTo(Admin|UserInterface $user): bool
  381.     {
  382.         if (!$user->isActive()) {
  383.             return false;
  384.         }
  385.         return true;
  386.     }
  387.     /**
  388.      * @return string|null
  389.      */
  390.     public function getColor(): ?string
  391.     {
  392.         return $this->color;
  393.     }
  394.     /**
  395.      * @param string|null $color
  396.      */
  397.     public function setColor(?string $color): void
  398.     {
  399.         $this->color $color;
  400.     }
  401.     /**
  402.      * @return Collection<int, Notification>
  403.      */
  404.     public function getNotifications(): Collection
  405.     {
  406.         return $this->notifications;
  407.     }
  408.     public function addNotification(Notification $notification): static
  409.     {
  410.         if (!$this->notifications->contains($notification)) {
  411.             $this->notifications->add($notification);
  412.             $notification->addAdmin($this);
  413.         }
  414.         return $this;
  415.     }
  416.     public function removeNotification(Notification $notification): static
  417.     {
  418.         if ($this->notifications->removeElement($notification)) {
  419.             $notification->removeAdmin($this);
  420.         }
  421.         return $this;
  422.     }
  423.     public function getAdminCode(): ?string
  424.     {
  425.         return $this->adminCode;
  426.     }
  427.     public function setAdminCode(): static
  428.     {
  429.         $characters '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  430.         $code '';
  431.         for ($i 0$i 6$i++) {
  432.             $code .= $characters[random_int(0strlen($characters) - 1)];
  433.         }
  434.         $this->adminCode $code;
  435.         return $this;
  436.     }
  437.     /**
  438.      * @return Collection<int, OrderNote>
  439.      */
  440.     public function getOrderNotes(): Collection
  441.     {
  442.         return $this->orderNotes;
  443.     }
  444.     public function addOrderNote(OrderNote $orderNote): static
  445.     {
  446.         if (!$this->orderNotes->contains($orderNote)) {
  447.             $this->orderNotes->add($orderNote);
  448.             $orderNote->setAdmin($this);
  449.         }
  450.         return $this;
  451.     }
  452.     public function removeOrderNote(OrderNote $orderNote): static
  453.     {
  454.         if ($this->orderNotes->removeElement($orderNote)) {
  455.             // set the owning side to null (unless already changed)
  456.             if ($orderNote->getAdmin() === $this) {
  457.                 $orderNote->setAdmin(null);
  458.             }
  459.         }
  460.         return $this;
  461.     }
  462.     /**
  463.      * @return Collection<int, ImplementerOrderHistory>
  464.      */
  465.     public
  466.     function getImplementerOrderHistories(): Collection
  467.     {
  468.         return $this->implementerOrderHistories;
  469.     }
  470.     public
  471.     function addImplementerOrderHistory(ImplementerOrderHistory $implementerOrderHistory): static
  472.     {
  473.         if (!$this->implementerOrderHistories->contains($implementerOrderHistory)) {
  474.             $this->implementerOrderHistories->add($implementerOrderHistory);
  475.             $implementerOrderHistory->setAdmin($this);
  476.         }
  477.         return $this;
  478.     }
  479.     public function removeImplementerOrderHistory(ImplementerOrderHistory $implementerOrderHistory): static
  480.     {
  481.         if ($this->implementerOrderHistories->removeElement($implementerOrderHistory)) {
  482.             // set the owning side to null (unless already changed)
  483.             if ($implementerOrderHistory->getAdmin() === $this) {
  484.                 $implementerOrderHistory->setAdmin(null);
  485.             }
  486.         }
  487.         return $this;
  488.     }
  489.     /**
  490.      * @return Collection<int, OrderNote>
  491.      */
  492.     public function getOrderEditedNotes(): Collection
  493.     {
  494.         return $this->orderEditedNotes;
  495.     }
  496.     public function addOrderEditedNote(OrderNote $orderEditedNote): static
  497.     {
  498.         if (!$this->orderEditedNotes->contains($orderEditedNote)) {
  499.             $this->orderEditedNotes->add($orderEditedNote);
  500.             $orderEditedNote->setLastEditedBy($this);
  501.         }
  502.         return $this;
  503.     }
  504.     public function removeOrderEditedNote(OrderNote $orderEditedNote): static
  505.     {
  506.         if ($this->orderEditedNotes->removeElement($orderEditedNote)) {
  507.             // set the owning side to null (unless already changed)
  508.             if ($orderEditedNote->getLastEditedBy() === $this) {
  509.                 $orderEditedNote->setLastEditedBy(null);
  510.             }
  511.         }
  512.         return $this;
  513.     }
  514.     /**
  515.      * @return Collection<int, Order>
  516.      */
  517.     public function getOrders(): Collection
  518.     {
  519.         return $this->orders;
  520.     }
  521.     public function addOrder(Order $order): static
  522.     {
  523.         if (!$this->orders->contains($order)) {
  524.             $this->orders->add($order);
  525.             $order->setAdmin($this);
  526.         }
  527.         return $this;
  528.     }
  529.     public function removeOrder(Order $order): static
  530.     {
  531.         if ($this->orders->removeElement($order)) {
  532.             // set the owning side to null (unless already changed)
  533.             if ($order->getAdmin() === $this) {
  534.                 $order->setAdmin(null);
  535.             }
  536.         }
  537.         return $this;
  538.     }
  539.     /**
  540.      * @return Collection<int, CommercialOffer>
  541.      */
  542.     public function getCommercialOffers(): Collection
  543.     {
  544.         return $this->commercialOffers;
  545.     }
  546.     public function addCommercialOffer(CommercialOffer $commercialOffer): static
  547.     {
  548.         if (!$this->commercialOffers->contains($commercialOffer)) {
  549.             $this->commercialOffers->add($commercialOffer);
  550.             $commercialOffer->setAddedBy($this);
  551.         }
  552.         return $this;
  553.     }
  554.     public function removeCommercialOffer(CommercialOffer $commercialOffer): static
  555.     {
  556.         if ($this->commercialOffers->removeElement($commercialOffer)) {
  557.             // set the owning side to null (unless already changed)
  558.             if ($commercialOffer->getAddedBy() === $this) {
  559.                 $commercialOffer->setAddedBy(null);
  560.             }
  561.         }
  562.         return $this;
  563.     }
  564.     /**
  565.      * @return Collection<int, WorkHistory>
  566.      */
  567.     public function getWorkHistories(): Collection
  568.     {
  569.         return $this->workHistories;
  570.     }
  571.     public function addWorkHistory(WorkHistory $workHistory): static
  572.     {
  573.         if (!$this->workHistories->contains($workHistory)) {
  574.             $this->workHistories->add($workHistory);
  575.             $workHistory->setAdmin($this);
  576.         }
  577.         return $this;
  578.     }
  579.     public function removeWorkHistory(WorkHistory $workHistory): static
  580.     {
  581.         if ($this->workHistories->removeElement($workHistory)) {
  582.             // set the owning side to null (unless already changed)
  583.             if ($workHistory->getAdmin() === $this) {
  584.                 $workHistory->setAdmin(null);
  585.             }
  586.         }
  587.         return $this;
  588.     }
  589.     /**
  590.      * @return Collection<int, CommercialOfferIndividual>
  591.      */
  592.     public function getCommercialOfferIndividuals(): Collection
  593.     {
  594.         return $this->commercialOfferIndividuals;
  595.     }
  596.     public function addCommercialOfferIndividual(CommercialOfferIndividual $commercialOfferIndividual): static
  597.     {
  598.         if (!$this->commercialOfferIndividuals->contains($commercialOfferIndividual)) {
  599.             $this->commercialOfferIndividuals->add($commercialOfferIndividual);
  600.             $commercialOfferIndividual->setCreatedByAdmin($this);
  601.         }
  602.         return $this;
  603.     }
  604.     public function removeCommercialOfferIndividual(CommercialOfferIndividual $commercialOfferIndividual): static
  605.     {
  606.         if ($this->commercialOfferIndividuals->removeElement($commercialOfferIndividual)) {
  607.             // set the owning side to null (unless already changed)
  608.             if ($commercialOfferIndividual->getCreatedByAdmin() === $this) {
  609.                 $commercialOfferIndividual->setCreatedByAdmin(null);
  610.             }
  611.         }
  612.         return $this;
  613.     }
  614.     /**
  615.      * @return Collection<int, CommercialOfferSendings>
  616.      */
  617.     public function getCommercialOfferSendings(): Collection
  618.     {
  619.         return $this->commercialOfferSendings;
  620.     }
  621.     public function addCommercialOfferSending(CommercialOfferSendings $commercialOfferSending): static
  622.     {
  623.         if (!$this->commercialOfferSendings->contains($commercialOfferSending)) {
  624.             $this->commercialOfferSendings->add($commercialOfferSending);
  625.             $commercialOfferSending->setAddedByAdmin($this);
  626.         }
  627.         return $this;
  628.     }
  629.     public function removeCommercialOfferSending(CommercialOfferSendings $commercialOfferSending): static
  630.     {
  631.         if ($this->commercialOfferSendings->removeElement($commercialOfferSending)) {
  632.             // set the owning side to null (unless already changed)
  633.             if ($commercialOfferSending->getAddedByAdmin() === $this) {
  634.                 $commercialOfferSending->setAddedByAdmin(null);
  635.             }
  636.         }
  637.         return $this;
  638.     }
  639.     /**
  640.      * @return Collection<int, CommercialOfferSendings>
  641.      */
  642.     public function getCommercialOfferSendingsAccepts(): Collection
  643.     {
  644.         return $this->commercialOfferSendingsAccepts;
  645.     }
  646.     /**
  647.      * @return Collection<int, CommercialOfferIndividual>
  648.      */
  649.     public function getCommercialOfferIndividualsAccepted(): Collection
  650.     {
  651.         return $this->commercialOfferIndividualsAccepted;
  652.     }
  653.     /**
  654.      * @return Collection<int, Reservations>
  655.      */
  656.     public function getReservations(): Collection
  657.     {
  658.         return $this->reservations;
  659.     }
  660.     public function addReservation(Reservations $reservation): static
  661.     {
  662.         if (!$this->reservations->contains($reservation)) {
  663.             $this->reservations->add($reservation);
  664.             $reservation->setAddedByAdmin($this);
  665.         }
  666.         return $this;
  667.     }
  668.     public function removeReservation(Reservations $reservation): static
  669.     {
  670.         if ($this->reservations->removeElement($reservation)) {
  671.             // set the owning side to null (unless already changed)
  672.             if ($reservation->getAddedByAdmin() === $this) {
  673.                 $reservation->setAddedByAdmin(null);
  674.             }
  675.         }
  676.         return $this;
  677.     }
  678.     /**
  679.      * @return Collection<int, Reservations>
  680.      */
  681.     public function getReservationsEdit(): Collection
  682.     {
  683.         return $this->reservationsEdit;
  684.     }
  685.     public function addReservationsEdit(Reservations $reservationsEdit): static
  686.     {
  687.         if (!$this->reservationsEdit->contains($reservationsEdit)) {
  688.             $this->reservationsEdit->add($reservationsEdit);
  689.             $reservationsEdit->setLastEditedBy($this);
  690.         }
  691.         return $this;
  692.     }
  693.     public function removeReservationsEdit(Reservations $reservationsEdit): static
  694.     {
  695.         if ($this->reservationsEdit->removeElement($reservationsEdit)) {
  696.             // set the owning side to null (unless already changed)
  697.             if ($reservationsEdit->getLastEditedBy() === $this) {
  698.                 $reservationsEdit->setLastEditedBy(null);
  699.             }
  700.         }
  701.         return $this;
  702.     }
  703.     /**
  704.      * @return Collection<int, DirectMessage>
  705.      */
  706.     public function getDirectMessagesSent(): Collection
  707.     {
  708.         return $this->directMessagesSent;
  709.     }
  710.     public function addDirectMessagesSent(DirectMessage $directMessagesSent): static
  711.     {
  712.         if (!$this->directMessagesSent->contains($directMessagesSent)) {
  713.             $this->directMessagesSent->add($directMessagesSent);
  714.             $directMessagesSent->setSenderAdmin($this);
  715.         }
  716.         return $this;
  717.     }
  718.     public function removeDirectMessagesSent(DirectMessage $directMessagesSent): static
  719.     {
  720.         if ($this->directMessagesSent->removeElement($directMessagesSent)) {
  721.             // set the owning side to null (unless already changed)
  722.             if ($directMessagesSent->getSenderAdmin() === $this) {
  723.                 $directMessagesSent->setSenderAdmin(null);
  724.             }
  725.         }
  726.         return $this;
  727.     }
  728.     /**
  729.      * @return Collection<int, DirectMessage>
  730.      */
  731.     public function getDirectMessagesReceived(): Collection
  732.     {
  733.         return $this->directMessagesReceived;
  734.     }
  735.     public function addDirectMessagesReceived(DirectMessage $directMessagesReceived): static
  736.     {
  737.         if (!$this->directMessagesReceived->contains($directMessagesReceived)) {
  738.             $this->directMessagesReceived->add($directMessagesReceived);
  739.             $directMessagesReceived->setReceiverAdmin($this);
  740.         }
  741.         return $this;
  742.     }
  743.     public function removeDirectMessagesReceived(DirectMessage $directMessagesReceived): static
  744.     {
  745.         if ($this->directMessagesReceived->removeElement($directMessagesReceived)) {
  746.             // set the owning side to null (unless already changed)
  747.             if ($directMessagesReceived->getReceiverAdmin() === $this) {
  748.                 $directMessagesReceived->setReceiverAdmin(null);
  749.             }
  750.         }
  751.         return $this;
  752.     }
  753.     public function isRemoteAccess(): ?bool
  754.     {
  755.         return $this->remoteAccess;
  756.     }
  757.     public function setRemoteAccess(bool $remoteAccess): static
  758.     {
  759.         $this->remoteAccess $remoteAccess;
  760.         return $this;
  761.     }
  762.     /**
  763.      * @return Collection<int, AdminNotificationSettings>
  764.      */
  765.     public function getAdminNotificationSettings(): Collection
  766.     {
  767.         return $this->adminNotificationSettings;
  768.     }
  769.     public function addAdminNotificationSetting(AdminNotificationSettings $adminNotificationSetting): static
  770.     {
  771.         if (!$this->adminNotificationSettings->contains($adminNotificationSetting)) {
  772.             $this->adminNotificationSettings->add($adminNotificationSetting);
  773.             $adminNotificationSetting->setAdmin($this);
  774.         }
  775.         return $this;
  776.     }
  777.     public function removeAdminNotificationSetting(AdminNotificationSettings $adminNotificationSetting): static
  778.     {
  779.         if ($this->adminNotificationSettings->removeElement($adminNotificationSetting)) {
  780.             // set the owning side to null (unless already changed)
  781.             if ($adminNotificationSetting->getAdmin() === $this) {
  782.                 $adminNotificationSetting->setAdmin(null);
  783.             }
  784.         }
  785.         return $this;
  786.     }
  787.     /**
  788.      * @return Collection<int, DebtNote>
  789.      */
  790.     public function getDebtNotes(): Collection
  791.     {
  792.         return $this->debtNotes;
  793.     }
  794.     public function addDebtNote(DebtNote $debtNote): static
  795.     {
  796.         if (!$this->debtNotes->contains($debtNote)) {
  797.             $this->debtNotes->add($debtNote);
  798.             $debtNote->setAdmin($this);
  799.         }
  800.         return $this;
  801.     }
  802.     public function removeDebtNote(DebtNote $debtNote): static
  803.     {
  804.         if ($this->debtNotes->removeElement($debtNote)) {
  805.             // set the owning side to null (unless already changed)
  806.             if ($debtNote->getAdmin() === $this) {
  807.                 $debtNote->setAdmin(null);
  808.             }
  809.         }
  810.         return $this;
  811.     }
  812.     /**
  813.      * @return Collection<int, CustomerHistory>
  814.      */
  815.     public function getCustomerHistories(): Collection
  816.     {
  817.         return $this->customerHistories;
  818.     }
  819.     public function addCustomerHistory(CustomerHistory $customerHistory): static
  820.     {
  821.         if (!$this->customerHistories->contains($customerHistory)) {
  822.             $this->customerHistories->add($customerHistory);
  823.             $customerHistory->setAdmin($this);
  824.         }
  825.         return $this;
  826.     }
  827.     public function removeCustomerHistory(CustomerHistory $customerHistory): static
  828.     {
  829.         if ($this->customerHistories->removeElement($customerHistory)) {
  830.             // set the owning side to null (unless already changed)
  831.             if ($customerHistory->getAdmin() === $this) {
  832.                 $customerHistory->setAdmin(null);
  833.             }
  834.         }
  835.         return $this;
  836.     }
  837.     public function getPhoto(): ?string
  838.     {
  839.         return $this->photo;
  840.     }
  841.     public function setPhoto(?string $photo): static
  842.     {
  843.         $this->photo $photo;
  844.         return $this;
  845.     }
  846.     public function isSendMail(): bool
  847.     {
  848.         return $this->sendMail;
  849.     }
  850.     public function setSendMail(bool $sendMail): static
  851.     {
  852.         $this->sendMail $sendMail;
  853.         return $this;
  854.     }
  855.     /**
  856.      * @return Collection<int, Product>
  857.      */
  858.     public function getProducts(): Collection
  859.     {
  860.         return $this->products;
  861.     }
  862.     public function addProduct(Product $product): static
  863.     {
  864.         if (!$this->products->contains($product)) {
  865.             $this->products->add($product);
  866.             $product->addAdminToInfo($this);
  867.         }
  868.         return $this;
  869.     }
  870.     public function removeProduct(Product $product): static
  871.     {
  872.         if ($this->products->removeElement($product)) {
  873.             $product->removeAdminToInfo($this);
  874.         }
  875.         return $this;
  876.     }
  877.     /**
  878.      * @return Collection<int, SmsHistory>
  879.      */
  880.     public function getSmsHistories(): Collection
  881.     {
  882.         return $this->smsHistories;
  883.     }
  884.     public function addSmsHistory(SmsHistory $smsHistory): static
  885.     {
  886.         if (!$this->smsHistories->contains($smsHistory)) {
  887.             $this->smsHistories->add($smsHistory);
  888.             $smsHistory->setSendByAdmin($this);
  889.         }
  890.         return $this;
  891.     }
  892.     public function removeSmsHistory(SmsHistory $smsHistory): static
  893.     {
  894.         if ($this->smsHistories->removeElement($smsHistory)) {
  895.             // set the owning side to null (unless already changed)
  896.             if ($smsHistory->getSendByAdmin() === $this) {
  897.                 $smsHistory->setSendByAdmin(null);
  898.             }
  899.         }
  900.         return $this;
  901.     }
  902.     /**
  903.      * @return Collection<int, NotificationToSendSetting>
  904.      */
  905.     public function getNotificationToSendSettings(): Collection
  906.     {
  907.         return $this->notificationToSendSettings;
  908.     }
  909.     public function addNotificationToSendSetting(NotificationToSendSetting $notificationToSendSetting): static
  910.     {
  911.         if (!$this->notificationToSendSettings->contains($notificationToSendSetting)) {
  912.             $this->notificationToSendSettings->add($notificationToSendSetting);
  913.             $notificationToSendSetting->addAdmin($this);
  914.         }
  915.         return $this;
  916.     }
  917.     public function removeNotificationToSendSetting(NotificationToSendSetting $notificationToSendSetting): static
  918.     {
  919.         if ($this->notificationToSendSettings->removeElement($notificationToSendSetting)) {
  920.             $notificationToSendSetting->removeAdmin($this);
  921.         }
  922.         return $this;
  923.     }
  924.     public function getMailbox(): ?Mailbox
  925.     {
  926.         return $this->mailbox;
  927.     }
  928.     public function setMailbox(?Mailbox $mailbox): static
  929.     {
  930.         // unset the owning side of the relation if necessary
  931.         if ($mailbox === null && $this->mailbox !== null) {
  932.             $this->mailbox->setAdmin(null);
  933.         }
  934.         // set the owning side of the relation if necessary
  935.         if ($mailbox !== null && $mailbox->getAdmin() !== $this) {
  936.             $mailbox->setAdmin($this);
  937.         }
  938.         $this->mailbox $mailbox;
  939.         return $this;
  940.     }
  941.     /**
  942.      * @return Collection<int, LeaveRequest>
  943.      */
  944.     public function getAcceptedLeaveRequests(): Collection
  945.     {
  946.         return $this->acceptedLeaveRequests;
  947.     }
  948.     public function addAcceptedLeaveRequest(LeaveRequest $acceptedLeaveRequest): static
  949.     {
  950.         if (!$this->acceptedLeaveRequests->contains($acceptedLeaveRequest)) {
  951.             $this->acceptedLeaveRequests->add($acceptedLeaveRequest);
  952.             $acceptedLeaveRequest->setAcceptedBy($this);
  953.         }
  954.         return $this;
  955.     }
  956.     public function removeAcceptedLeaveRequest(LeaveRequest $acceptedLeaveRequest): static
  957.     {
  958.         if ($this->acceptedLeaveRequests->removeElement($acceptedLeaveRequest)) {
  959.             // set the owning side to null (unless already changed)
  960.             if ($acceptedLeaveRequest->getAcceptedBy() === $this) {
  961.                 $acceptedLeaveRequest->setAcceptedBy(null);
  962.             }
  963.         }
  964.         return $this;
  965.     }
  966.     /**
  967.      * @return Collection<int, LeaveRequest>
  968.      */
  969.     public function getRejectedLeaveRequests(): Collection
  970.     {
  971.         return $this->rejectedLeaveRequests;
  972.     }
  973.     public function addRejectedLeaveRequest(LeaveRequest $rejectedLeaveRequest): static
  974.     {
  975.         if (!$this->rejectedLeaveRequests->contains($rejectedLeaveRequest)) {
  976.             $this->rejectedLeaveRequests->add($rejectedLeaveRequest);
  977.             $rejectedLeaveRequest->setRejectedBy($this);
  978.         }
  979.         return $this;
  980.     }
  981.     public function removeRejectedLeaveRequest(LeaveRequest $rejectedLeaveRequest): static
  982.     {
  983.         if ($this->rejectedLeaveRequests->removeElement($rejectedLeaveRequest)) {
  984.             // set the owning side to null (unless already changed)
  985.             if ($rejectedLeaveRequest->getRejectedBy() === $this) {
  986.                 $rejectedLeaveRequest->setRejectedBy(null);
  987.             }
  988.         }
  989.         return $this;
  990.     }
  991.     /**
  992.      * @return Collection<int, Task>
  993.      */
  994.     public function getAcceptedTasks(): Collection
  995.     {
  996.         return $this->acceptedTasks;
  997.     }
  998.     public function addAcceptedTask(Task $acceptedTask): static
  999.     {
  1000.         if (!$this->acceptedTasks->contains($acceptedTask)) {
  1001.             $this->acceptedTasks->add($acceptedTask);
  1002.             $acceptedTask->setAcceptedBy($this);
  1003.         }
  1004.         return $this;
  1005.     }
  1006.     public function removeAcceptedTask(Task $acceptedTask): static
  1007.     {
  1008.         if ($this->acceptedTasks->removeElement($acceptedTask)) {
  1009.             // set the owning side to null (unless already changed)
  1010.             if ($acceptedTask->getAcceptedBy() === $this) {
  1011.                 $acceptedTask->setAcceptedBy(null);
  1012.             }
  1013.         }
  1014.         return $this;
  1015.     }
  1016.     public function getPosition(): ?Position
  1017.     {
  1018.         return $this->position;
  1019.     }
  1020.     public function setPosition(?Position $position): static
  1021.     {
  1022.         $this->position $position;
  1023.         return $this;
  1024.     }
  1025.     /**
  1026.      * @return Collection<int, Agreement>
  1027.      */
  1028.     public function getAgreementsToSendAfterSigned(): Collection
  1029.     {
  1030.         return $this->agreementsToSendAfterSigned;
  1031.     }
  1032.     public function addAgreementsToSendAfterSigned(Agreement $agreementsToSendAfterSigned): static
  1033.     {
  1034.         if (!$this->agreementsToSendAfterSigned->contains($agreementsToSendAfterSigned)) {
  1035.             $this->agreementsToSendAfterSigned->add($agreementsToSendAfterSigned);
  1036.             $agreementsToSendAfterSigned->addAgreementToSendAfterSigned($this);
  1037.         }
  1038.         return $this;
  1039.     }
  1040.     public function removeAgreementsToSendAfterSigned(Agreement $agreementsToSendAfterSigned): static
  1041.     {
  1042.         if ($this->agreementsToSendAfterSigned->removeElement($agreementsToSendAfterSigned)) {
  1043.             $agreementsToSendAfterSigned->removeAgreementToSendAfterSigned($this);
  1044.         }
  1045.         return $this;
  1046.     }
  1047.     /**
  1048.      * @return Collection<int, WorkTime>
  1049.      */
  1050.     public function getWorkTimes(): Collection
  1051.     {
  1052.         return $this->workTimes;
  1053.     }
  1054.     public function addWorkTime(WorkTime $workTime): static
  1055.     {
  1056.         if (!$this->workTimes->contains($workTime)) {
  1057.             $this->workTimes->add($workTime);
  1058.             $workTime->setAdminInstance($this);
  1059.         }
  1060.         return $this;
  1061.     }
  1062.     public function removeWorkTime(WorkTime $workTime): static
  1063.     {
  1064.         if ($this->workTimes->removeElement($workTime)) {
  1065.             // set the owning side to null (unless already changed)
  1066.             if ($workTime->getAdmin() === $this) {
  1067.                 $workTime->setAdmin(null);
  1068.             }
  1069.         }
  1070.         return $this;
  1071.     }
  1072.     public function getNominalWorkTime(): ?NominalWorkTime
  1073.     {
  1074.         return $this->nominalWorkTime;
  1075.     }
  1076.     public function setNominalWorkTime(?NominalWorkTime $nominalWorkTime): static
  1077.     {
  1078.         $this->nominalWorkTime $nominalWorkTime;
  1079.         return $this;
  1080.     }
  1081.     /**
  1082.      * @return Collection<int, LeaveRequest>
  1083.      */
  1084.     public function getLeaveRequests(): Collection
  1085.     {
  1086.         return $this->leaveRequests;
  1087.     }
  1088.     public function addLeaveRequest(LeaveRequest $leaveRequest): static
  1089.     {
  1090.         if (!$this->leaveRequests->contains($leaveRequest)) {
  1091.             $this->leaveRequests->add($leaveRequest);
  1092.             $leaveRequest->setAdmin($this);
  1093.         }
  1094.         return $this;
  1095.     }
  1096.     public function removeLeaveRequest(LeaveRequest $leaveRequest): static
  1097.     {
  1098.         if ($this->leaveRequests->removeElement($leaveRequest)) {
  1099.             // set the owning side to null (unless already changed)
  1100.             if ($leaveRequest->getAdmin() === $this) {
  1101.                 $leaveRequest->setAdmin(null);
  1102.             }
  1103.         }
  1104.         return $this;
  1105.     }
  1106.     /**
  1107.      * @return Collection<int, AccountingOfficeSendingNote>
  1108.      */
  1109.     public function getAccountingOfficeSendingNotes(): Collection
  1110.     {
  1111.         return $this->accountingOfficeSendingNotes;
  1112.     }
  1113.     public function addAccountingOfficeSendingNote(AccountingOfficeSendingNote $accountingOfficeSendingNote): static
  1114.     {
  1115.         if (!$this->accountingOfficeSendingNotes->contains($accountingOfficeSendingNote)) {
  1116.             $this->accountingOfficeSendingNotes->add($accountingOfficeSendingNote);
  1117.             $accountingOfficeSendingNote->setAdmin($this);
  1118.         }
  1119.         return $this;
  1120.     }
  1121.     public function removeAccountingOfficeSendingNote(AccountingOfficeSendingNote $accountingOfficeSendingNote): static
  1122.     {
  1123.         if ($this->accountingOfficeSendingNotes->removeElement($accountingOfficeSendingNote)) {
  1124.             // set the owning side to null (unless already changed)
  1125.             if ($accountingOfficeSendingNote->getAdmin() === $this) {
  1126.                 $accountingOfficeSendingNote->setAdmin(null);
  1127.             }
  1128.         }
  1129.         return $this;
  1130.     }
  1131.     public function isToRcp(): bool
  1132.     {
  1133.         return $this->toRcp;
  1134.     }
  1135.     public function setToRcp(bool $toRcp): void
  1136.     {
  1137.         $this->toRcp $toRcp;
  1138.     }
  1139.     /**
  1140.      * @return Collection<int, WorkTime>
  1141.      */
  1142.     public function getAcceptedWorkTimes(): Collection
  1143.     {
  1144.         return $this->acceptedWorkTimes;
  1145.     }
  1146.     public function addAcceptedWorkTime(WorkTime $acceptedWorkTime): static
  1147.     {
  1148.         if (!$this->acceptedWorkTimes->contains($acceptedWorkTime)) {
  1149.             $this->acceptedWorkTimes->add($acceptedWorkTime);
  1150.             $acceptedWorkTime->setAcceptedBy($this);
  1151.         }
  1152.         return $this;
  1153.     }
  1154.     public function removeAcceptedWorkTime(WorkTime $acceptedWorkTime): static
  1155.     {
  1156.         if ($this->acceptedWorkTimes->removeElement($acceptedWorkTime)) {
  1157.             // set the owning side to null (unless already changed)
  1158.             if ($acceptedWorkTime->getAcceptedBy() === $this) {
  1159.                 $acceptedWorkTime->setAcceptedBy(null);
  1160.             }
  1161.         }
  1162.         return $this;
  1163.     }
  1164.     /**
  1165.      * @return Collection<int, Department>
  1166.      */
  1167.     public function getDepartments(): Collection
  1168.     {
  1169.         return $this->departments;
  1170.     }
  1171.     public function addDepartment(Department $department): static
  1172.     {
  1173.         if (!$this->departments->contains($department)) {
  1174.             $this->departments->add($department);
  1175.             $department->addManagement($this);
  1176.         }
  1177.         return $this;
  1178.     }
  1179.     public function removeDepartment(Department $department): static
  1180.     {
  1181.         if ($this->departments->removeElement($department)) {
  1182.             $department->removeManagement($this);
  1183.         }
  1184.         return $this;
  1185.     }
  1186.     /** @return Collection<int, NumberBlocking> */
  1187.     public function getNumberBlockings(): Collection
  1188.     {
  1189.         return $this->numberBlockings;
  1190.     }
  1191.     public function addNumberBlocking(NumberBlocking $nb): self
  1192.     {
  1193.         if (!$this->numberBlockings->contains($nb)) {
  1194.             $this->numberBlockings->add($nb);
  1195.             $nb->setAddedBy($this);
  1196.         }
  1197.         return $this;
  1198.     }
  1199.     public function removeNumberBlocking(NumberBlocking $nb): self
  1200.     {
  1201.         if ($this->numberBlockings->removeElement($nb)) {
  1202.             if ($nb->getAddedBy() === $this) {
  1203.                 $nb->setAddedBy(null);
  1204.             }
  1205.         }
  1206.         return $this;
  1207.     }
  1208.     /** @return Collection<int, NumberBlocking> */
  1209.     public function getNumberBlockingsBlocked(): Collection
  1210.     {
  1211.         return $this->numberBlockingsBlocked;
  1212.     }
  1213.     public function addNumberBlockingBlocked(NumberBlocking $nb): self
  1214.     {
  1215.         if (!$this->numberBlockingsBlocked->contains($nb)) {
  1216.             $this->numberBlockingsBlocked->add($nb);
  1217.             $nb->setBlockedBy($this);
  1218.         }
  1219.         return $this;
  1220.     }
  1221.     public function removeNumberBlockingBlocked(NumberBlocking $nb): self
  1222.     {
  1223.         if ($this->numberBlockingsBlocked->removeElement($nb)) {
  1224.             if ($nb->getBlockedBy() === $this) {
  1225.                 $nb->setBlockedBy(null);
  1226.             }
  1227.         }
  1228.         return $this;
  1229.     }
  1230.     public function getAdminDepartment(): ?AdminDepartment
  1231.     {
  1232.         return $this->adminDepartment;
  1233.     }
  1234.     public function setAdminDepartment(?AdminDepartment $adminDepartment): static
  1235.     {
  1236.         $this->adminDepartment $adminDepartment;
  1237.         return $this;
  1238.     }
  1239.     public function isAcceptedRegulations(): ?bool
  1240.     {
  1241.         return $this->acceptedRegulations;
  1242.     }
  1243.     public function setAcceptedRegulations(bool $acceptedRegulations): static
  1244.     {
  1245.         $this->acceptedRegulations $acceptedRegulations;
  1246.         return $this;
  1247.     }
  1248.     public function getAcceptedRegulationsDate(): ?\DateTimeInterface
  1249.     {
  1250.         return $this->acceptedRegulationsDate;
  1251.     }
  1252.     public function setAcceptedRegulationsDate(?\DateTimeInterface $acceptedRegulationsDate): static
  1253.     {
  1254.         $this->acceptedRegulationsDate $acceptedRegulationsDate;
  1255.         return $this;
  1256.     }
  1257.     public function isAcceptedZfss(): ?bool
  1258.     {
  1259.         return $this->acceptedZfss;
  1260.     }
  1261.     public function setAcceptedZfss(bool $acceptedZfss): static
  1262.     {
  1263.         $this->acceptedZfss $acceptedZfss;
  1264.         return $this;
  1265.     }
  1266.     public function getAcceptedZfssDate(): ?\DateTimeInterface
  1267.     {
  1268.         return $this->acceptedZfssDate;
  1269.     }
  1270.     public function setAcceptedZfssDate(?\DateTimeInterface $acceptedZfssDate): static
  1271.     {
  1272.         $this->acceptedZfssDate $acceptedZfssDate;
  1273.         return $this;
  1274.     }
  1275.     public function getAdminContractType(): ?EmploymentContractType
  1276.     {
  1277.         return $this->adminContractType;
  1278.     }
  1279.     public function setAdminContractType(?EmploymentContractType $adminContractType): static
  1280.     {
  1281.         $this->adminContractType $adminContractType;
  1282.         return $this;
  1283.     }
  1284.     /**
  1285.      * @return Collection<int, LeaveRequestBalance>
  1286.      */
  1287.     public function getLeaveRequestBalances(): Collection
  1288.     {
  1289.         return $this->leaveRequestBalances;
  1290.     }
  1291.     public function addLeaveRequestBalance(LeaveRequestBalance $leaveRequestBalance): static
  1292.     {
  1293.         if (!$this->leaveRequestBalances->contains($leaveRequestBalance)) {
  1294.             $this->leaveRequestBalances->add($leaveRequestBalance);
  1295.             $leaveRequestBalance->setAdmin($this);
  1296.         }
  1297.         return $this;
  1298.     }
  1299.     public function removeLeaveRequestBalance(LeaveRequestBalance $leaveRequestBalance): static
  1300.     {
  1301.         if ($this->leaveRequestBalances->removeElement($leaveRequestBalance)) {
  1302.             // set the owning side to null (unless already changed)
  1303.             if ($leaveRequestBalance->getAdmin() === $this) {
  1304.                 $leaveRequestBalance->setAdmin(null);
  1305.             }
  1306.         }
  1307.         return $this;
  1308.     }
  1309.     public function getMailFooter(): ?string
  1310.     {
  1311.         return $this->mailFooter;
  1312.     }
  1313.     public function setMailFooter(?string $mailFooter): static
  1314.     {
  1315.         $this->mailFooter $mailFooter;
  1316.         return $this;
  1317.     }
  1318. }