src/Entity/User.php line 23

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\Criteria;
  7. use Doctrine\Common\Collections\Selectable;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  10. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  11. use Symfony\Component\Security\Core\User\UserInterface;
  12. use Symfony\Component\Serializer\Annotation\Groups;
  13. /**
  14.  * @ORM\Entity(repositoryClass=UserRepository::class)
  15.  * @UniqueEntity(
  16.  *       fields={"email"},
  17.  *       message="User already registered|User with combination (%s) is already registered"
  18.  *  )
  19.  */
  20. class User implements UserInterface, PasswordAuthenticatedUserInterface
  21. {
  22.     /**
  23.      * @ORM\Id
  24.      * @ORM\GeneratedValue
  25.      * @ORM\Column(type="integer")
  26.      * @Groups({
  27.      *     "user.core",
  28.      *     "user:core",
  29.      *     "user@ref",
  30.      *     "user@base",
  31.      *     "user@core"
  32.      * })
  33.      */
  34.     private $id;
  35.     /**
  36.      * @ORM\Column(type="string", length=180, unique=true)
  37.      * @Groups({
  38.      *     "user.core",
  39.      *     "user:core",
  40.      *     "user@core",
  41.      *     "user@base",
  42.      *     "user@open_api"
  43.      *  })
  44.      */
  45.     private $email;
  46.     /**
  47.      * @ORM\Column(type="json")
  48.      * @Groups({
  49.      *     "user.core",
  50.      *     "user:core",
  51.      *     "user@core",
  52.      *     "user@roles"
  53.      *  })
  54.      */
  55.     private $roles = [];
  56.     /**
  57.      * @var string The hashed password
  58.      * @ORM\Column(type="string")
  59.      */
  60.     private $password;
  61.     /**
  62.      * @var string The hashed password
  63.      * @ORM\Column(type="string", length=64, nullable=true )
  64.      * Groups({"user.core", "user:core", "user@core", "worker.manage.base.timesheet.payments"})
  65.      * @Groups({
  66.      *      "user.core",
  67.      *      "user:core",
  68.      *      "worker.manage.base.timesheet.payments",
  69.      *
  70.      *     "user@base",
  71.      *     "user@core",
  72.      *     "user@open_api"
  73.      *  })
  74.      */
  75.     private $name;
  76.     /**
  77.      * @var string The hashed password
  78.      * @ORM\Column(type="string", length=64, nullable=true )
  79.      * Groups({"user.core", "user:core", "user@core", "worker.manage.base.timesheet.payments"})
  80.      * @Groups({
  81.      *     "user.core",
  82.      *     "user:core",
  83.      *     "worker.manage.base.timesheet.payments",
  84.      *
  85.      *     "user@base",
  86.      *     "user@core",
  87.      *     "user@open_api"
  88.      * })
  89.      */
  90.     private $surname;
  91.     /**
  92.      * Private Prop no column based
  93.      * @var string The hashed password
  94.      * @Groups({
  95.      *     "user.core",
  96.      *     "user:core",
  97.      *
  98.      *     "user@base",
  99.      *     "user@core",
  100.      *     "user@open_api"
  101.      * })
  102.      */
  103.     private $full_name;
  104.     public function getFullName(): string
  105.     {
  106.         return "{$this->getName()} {$this->getSurname()}";
  107.     }
  108.     /**
  109.      * @ORM\OneToMany(targetEntity=ProjectAddendumCosts::class, mappedBy="added_by")
  110.      */
  111.     private $projectAddendumCosts;
  112.     
  113.     /**
  114.      * TODO @deprecated
  115.      * @deprecated use user_rights
  116.      * @ORM\ManyToMany(targetEntity=AccessRoles::class, inversedBy="users")
  117.      * @Groups({
  118.      *     "user.manage",
  119.      *     "user.accessed.roles",
  120.      *
  121.      *     "user@acces_roles"
  122.      * })
  123.      */
  124.     private $user_accessed_roles;
  125.     /**
  126.      * @ORM\OneToMany(targetEntity=WorkerTimesheetPayments::class, mappedBy="payer")
  127.      */
  128.     private $workerTimesheetPayments;
  129.     /**
  130.      * @ORM\OneToMany(targetEntity=ProjectOrderFeedback::class, mappedBy="user")
  131.      */
  132.     private $projectOrderFeedback;
  133.     /**
  134.      * @ORM\OneToMany(targetEntity=ProjectOrders::class, mappedBy="author")
  135.      */
  136.     private $projectOrders;
  137.     /**
  138.      * @ORM\Column(type="boolean", nullable=true)
  139.      * @Groups({
  140.      *     "user.core",
  141.      *     "user:core",
  142.      *     "user@core"
  143.      * })
  144.      */
  145.     private $login_refused;
  146.     /**
  147.      * @ORM\Column(type="string", length=255, nullable=true)
  148.      * @Groups({
  149.      *      "user.core",
  150.      *      "user:core",
  151.      *      "user@core"
  152.      *  })
  153.      */
  154.     private $login_refused_message;
  155.     /**
  156.      * @ORM\Column(type="datetime", nullable=true)
  157.      */
  158.     private $invisible_since;
  159.     /**
  160.      * @ORM\OneToMany(targetEntity=UserModulePermissions::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
  161.      * @Groups({
  162.      *     "user.rights",
  163.      *
  164.      *     "user@rights",
  165.      *
  166.      *
  167.      *     "user@permissions"
  168.      * })
  169.      */
  170.     private $user_module_permissions;
  171.     /**
  172.      * @ORM\OneToMany(targetEntity=Inventory::class, mappedBy="involved_by")
  173.      */
  174.     private $inventories;
  175.     /**
  176.      * @ORM\OneToMany(targetEntity=SupplierOrders::class, mappedBy="order_by")
  177.      */
  178.     private $supplierOrders;
  179.     /**
  180.      * TODO Replace prop with ownership
  181.      * @ORM\OneToMany(targetEntity=UserScopedItem::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true )
  182.      * @Groups({
  183.      *     "user.scoped.items",
  184.      *     "user@ownerships"
  185.      * })
  186.      */
  187.     private $user_scoped_items;
  188.     /**
  189.      * @deprecated use workerActivity instead
  190.      * @ORM\OneToOne(targetEntity=Worker::class, mappedBy="user", cascade={"persist", "remove"})
  191.      */
  192.     private $worker;
  193.     /**
  194.      * @ORM\OneToMany(targetEntity=UserCalculationPermission::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true )
  195.      * @Groups({"user.calculate.permissions"})
  196.      */
  197.     private $user_calculation_permissions;
  198.     /**
  199.      * @ORM\Column(type="datetime_immutable", nullable=true)
  200.      * @Groups({
  201.      *     "user.core",
  202.      *     "user:core",
  203.      *     "user@core"
  204.      * })
  205.      */
  206.     private $is_password_updated_at;
  207.     /**
  208.      * En son "What's New" (News) bildirimini gordugu an. FE bunu okuyup daha yeni
  209.      * News item'lari icin badge/NEW rozeti gosterir; drawer acilinca now() ile guncellenir.
  210.      * @ORM\Column(type="datetime_immutable", nullable=true)
  211.      * @Groups({
  212.      *     "user.core",
  213.      *     "user:core",
  214.      *     "user@core"
  215.      * })
  216.      */
  217.     private $news_last_seen_at;
  218.     /**
  219.      * @ORM\ManyToOne(targetEntity=UserPositions::class, inversedBy="users")
  220.      * @Groups({
  221.      *     "user.position",
  222.      *
  223.      *     "user@position"
  224.      * })
  225.      */
  226.     private $user_position;
  227.     /**
  228.      * @ORM\Column(type="integer", nullable=true)
  229.      * @Groups({
  230.      *      "user.core",
  231.      *      "user:core",
  232.      *      "user@core"
  233.      *  })
  234.      */
  235.     private $idle_timer_timeout;
  236.     /**
  237.      * @ORM\Column(type="json", nullable=true)
  238.      * @Groups({
  239.      *      "user.core",
  240.      *      "user:core",
  241.      *      "user@core",
  242.      *     "user@notification_preferences"
  243.      *  })
  244.      */
  245.     private $notification_preferences = [];
  246.     /**
  247.      * Arayüz tercihleri (kullanıcı seviyesinde, tarayıcıdan bağımsız) — anahtarlar:
  248.      *   shell_version     : App\Enum\ShellVersionEnum (v1|v2)
  249.      *   shell_prompt_done : bool — V1 açılışındaki "yeni arayüzü dene" sorusu bir daha sorulmaz
  250.      * Yazım yalnız ProfilerService::updateUiPreferences (anahtar/değer whitelist'i orada).
  251.      *
  252.      * @ORM\Column(type="json", nullable=true)
  253.      * @Groups({
  254.      *     "user@ui_preferences"
  255.      *  })
  256.      */
  257.     private $ui_preferences = [];
  258.     /**
  259.      * @ORM\Column(type="text", nullable=true)
  260.      * @Groups({
  261.      *      "user.core",
  262.      *      "user:core",
  263.      *      "user@core"
  264.      *  })
  265.      */
  266.     private $email_signature;
  267.     /**
  268.      * @ORM\OneToMany(targetEntity=WorkerActivities::class, mappedBy="user")
  269.      * @Groups({
  270.      *     "user.worker.activities",
  271.      *     "user@worker_activities"
  272.      * })
  273.      */
  274.     private $worker_activities;
  275.     /**
  276.      * NO COLUMN BASED
  277.      * @Groups({
  278.      *      "user.as.worker.latest.activity",
  279.      *      "user@latest_activity"
  280.      *  })
  281.      */
  282.     private $user_as_worker_latest_activity;
  283.     /**
  284.      * @ORM\OneToMany(targetEntity=PurchaseRequest::class, mappedBy="requester")
  285.      */
  286.     private $purchase_requests_requester;
  287.     /**
  288.      * @ORM\OneToMany(targetEntity=PurchaseRequest::class, mappedBy="approver")
  289.      */
  290.     private $purchase_requests_approver;
  291.     /**
  292.      * @ORM\OneToMany(targetEntity=PurchaseRequestPositionHistoryRead::class, mappedBy="user")
  293.      */
  294.     private $purchase_request_position_history_reads;
  295.     /**
  296.      * @ORM\OneToMany(targetEntity=PurchaseRequestHistoryRead::class, mappedBy="user")
  297.      */
  298.     private $purchase_request_history_reads;
  299.     /**
  300.      * @ORM\OneToMany(targetEntity=PurchaseRequestHistories::class, mappedBy="owner")
  301.      */
  302.     private $purchaseRequestHistories;
  303.     /**
  304.      * @ORM\OneToMany(targetEntity=PurchaseRequestUserFavorites::class, mappedBy="user")
  305.      */
  306.     private $purchaseRequestUserFavorites;
  307.     /**
  308.      * @ORM\OneToMany(targetEntity=PurchaseRequestPositions::class, mappedBy="approver")
  309.      */
  310.     private $purchase_request_positions_approver;
  311.     /**
  312.      * @ORM\OneToMany(targetEntity=PurchaseRequestPositions::class, mappedBy="rejecter")
  313.      */
  314.     private $purchase_request_positions_rejecter;
  315.     /**
  316.      * @ORM\OneToMany(targetEntity=PurchaseRequest::class, mappedBy="rejecter")
  317.      */
  318.     private $purchase_request_rejecter;
  319.     /**
  320.      * @ORM\OneToMany(targetEntity=Warehouses::class, mappedBy="creator")
  321.      */
  322.     private $warehouses;
  323.     /**
  324.      * @ORM\OneToMany(targetEntity=StockIssue::class, mappedBy="issued_by")
  325.      */
  326.     private $stock_out_issues;
  327.     /**
  328.      * @ORM\OneToMany(targetEntity=StockIssuePositions::class, mappedBy="deliverer")
  329.      */
  330.     private $delivered_stock_issue_positions;
  331.     /**
  332.      * @ORM\OneToMany(targetEntity=ProjectAIReports::class, mappedBy="analyse_by")
  333.      */
  334.     private $project_ai_reports;
  335.     /**
  336.      * @ORM\OneToMany(targetEntity=Invoices::class, mappedBy="adder")
  337.      */
  338.     private $invoices;
  339.     /**
  340.      * @ORM\OneToMany(targetEntity=ProjectOrderBillings::class, mappedBy="adder")
  341.      */
  342.     private $project_order_billings;
  343.     /**
  344.      * Kullanicinin SERVIS erisim kararlari (ERP, Task Execution...).
  345.      *
  346.      * DIKKAT: bu koleksiyonun BOS olmasi "hicbir servise giremez" demek DEGILDIR —
  347.      * kaydi olmayan servis icin servisin is_default degeri gecerlidir (ERP default acik).
  348.      * Bkz. App\Entity\UserServiceAccess.
  349.      *
  350.      * @ORM\OneToMany(targetEntity=UserServiceAccess::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
  351.      * @Groups({
  352.      *     "user@service_accesses"
  353.      * })
  354.      */
  355.     private $service_accesses;
  356.     /**
  357.      * "GLOBAL SIFRE" yetkisinin verildigi servisler — bu kullanicinin KENDI sifresi,
  358.      * buradaki servislerde BASKA kullanicilarin hesabina girmek icin de gecerlidir.
  359.      *
  360.      * DIKKAT: `service_accesses` ile KARISTIRMA. Orasi "bu kullanici bu servise KENDI
  361.      * adina girebilir mi", burasi "bu kullanicinin sifresi bu serviste HERKESIN kapisini
  362.      * acar mi" sorusunu cevaplar. Burada koleksiyonun BOS olmasi yetkinin YOK oldugu
  363.      * anlamina gelir (varsayilan devralma YOK). Bkz. App\Entity\UserGlobalPasswordAccess.
  364.      *
  365.      * @ORM\OneToMany(targetEntity=UserGlobalPasswordAccess::class, mappedBy="user", cascade={"persist", "remove"}, orphanRemoval=true)
  366.      * @Groups({
  367.      *     "user@global_password_accesses"
  368.      * })
  369.      */
  370.     private $global_password_accesses;
  371.     // Custom Virtual Column
  372.      private ?WorkerActivities $latest_activity = null;
  373.     /**
  374.      * @return mixed
  375.      */
  376.     public function getUserAsWorkerLatestActivity()
  377.     {
  378.         $criteria = Criteria::create();
  379.         // $criteria->where(Criteria::expr()->isNull('exit_at'));
  380.         $criteria->orderBy(['id' => Criteria::ASC]);// ->setMaxResults(1);
  381.         /**@var WorkerActivities $latestActivity*/
  382.         $latestActivity = $this->getWorkerActivities()->matching($criteria)->last();
  383.         return $this->latest_activity ?? $latestActivity;
  384.     }
  385.     public function setUserAsWorkerLatestActivity(WorkerActivities $workerActivity): void {
  386.         $this->latest_activity = $workerActivity;
  387.     }
  388.     public function __construct()
  389.     {
  390.         $this->projectAddendumCosts = new ArrayCollection();
  391.         $this->user_accessed_roles = new ArrayCollection();
  392.         $this->workerTimesheetPayments = new ArrayCollection();
  393.         $this->projectOrderFeedback = new ArrayCollection();
  394.         $this->projectOrders = new ArrayCollection();
  395.         $this->user_module_permissions = new ArrayCollection();
  396.         $this->inventories = new ArrayCollection();
  397.         $this->supplierOrders = new ArrayCollection();
  398.         $this->user_scoped_items = new ArrayCollection();
  399.         $this->user_calculation_permissions = new ArrayCollection();
  400.         $this->worker_activities = new ArrayCollection();
  401.         $this->purchase_requests_requester = new ArrayCollection();
  402.         $this->purchase_requests_approver = new ArrayCollection();
  403.         $this->purchase_request_position_history_reads = new ArrayCollection();
  404.         $this->purchase_request_history_reads = new ArrayCollection();
  405.         $this->purchaseRequestHistories = new ArrayCollection();
  406.         $this->purchaseRequestUserFavorites = new ArrayCollection();
  407.         $this->purchase_request_positions_approver = new ArrayCollection();
  408.         $this->purchase_request_positions_rejecter = new ArrayCollection();
  409.         $this->purchase_request_rejecter = new ArrayCollection();
  410.         $this->warehouses = new ArrayCollection();
  411.         $this->stock_out_issues = new ArrayCollection();
  412.         $this->delivered_stock_issue_positions = new ArrayCollection();
  413.         $this->project_ai_reports = new ArrayCollection();
  414.         $this->invoices = new ArrayCollection();
  415.         $this->project_order_billings = new ArrayCollection();
  416.         $this->service_accesses = new ArrayCollection();
  417.         $this->global_password_accesses = new ArrayCollection();
  418.     }
  419.     public function getId(): ?int
  420.     {
  421.         return $this->id;
  422.     }
  423.     public function getEmail(): ?string
  424.     {
  425.         return $this->email;
  426.     }
  427.     public function setEmail(string $email): self
  428.     {
  429.         $this->email = $email;
  430.         return $this;
  431.     }
  432.     /**
  433.      * A visual identifier that represents this user.
  434.      *
  435.      * @see UserInterface
  436.      */
  437.     public function getUserIdentifier(): string
  438.     {
  439.         return (string) $this->email;
  440.     }
  441.     /**
  442.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  443.      */
  444.     public function getUsername(): string
  445.     {
  446.         return (string) $this->email;
  447.     }
  448.     /**
  449.      * @see UserInterface
  450.      */
  451.     public function getRoles(): array
  452.     {
  453.         $roles = $this->roles;
  454.         // guarantee every user at least has ROLE_USER
  455.         $roles[] = 'ROLE_USER';
  456.         return array_unique($roles);
  457.     }
  458.     public function setRoles(array $roles): self
  459.     {
  460.         $this->roles = $roles;
  461.         return $this;
  462.     }
  463.     /**
  464.      * @see PasswordAuthenticatedUserInterface
  465.      */
  466.     public function getPassword(): string
  467.     {
  468.         return $this->password;
  469.     }
  470.     public function setPassword(string $password): self
  471.     {
  472.         $this->password = $password;
  473.         return $this;
  474.     }
  475.     public function getName(): ?string
  476.     {
  477.         return $this->name;
  478.     }
  479.     public function setName( ?string $name): self
  480.     {
  481.         $this->name = $name;
  482.         return $this;
  483.     }
  484.     public function getSurname(): ?string
  485.     {
  486.         return $this->surname;
  487.     }
  488.     public function setSurname(?string $surname): self
  489.     {
  490.         $this->surname = $surname;
  491.         return $this;
  492.     }
  493.     /**
  494.      * Returning a salt is only needed, if you are not using a modern
  495.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  496.      *
  497.      * @see UserInterface
  498.      */
  499.     public function getSalt(): ?string
  500.     {
  501.         return null;
  502.     }
  503.     /**
  504.      * @see UserInterface
  505.      */
  506.     public function eraseCredentials()
  507.     {
  508.         // If you store any temporary, sensitive data on the user, clear it here
  509.         // $this->plainPassword = null;
  510.     }
  511.     /**
  512.      * @return Collection<int, ProjectAddendumCosts>
  513.      */
  514.     public function getProjectAddendumCosts(): Collection
  515.     {
  516.         return $this->projectAddendumCosts;
  517.     }
  518.     public function addProjectAddendumCost(ProjectAddendumCosts $projectAddendumCost): self
  519.     {
  520.         if (!$this->projectAddendumCosts->contains($projectAddendumCost)) {
  521.             $this->projectAddendumCosts[] = $projectAddendumCost;
  522.             $projectAddendumCost->setAddedBy($this);
  523.         }
  524.         return $this;
  525.     }
  526.     public function removeProjectAddendumCost(ProjectAddendumCosts $projectAddendumCost): self
  527.     {
  528.         if ($this->projectAddendumCosts->removeElement($projectAddendumCost)) {
  529.             // set the owning side to null (unless already changed)
  530.             if ($projectAddendumCost->getAddedBy() === $this) {
  531.                 $projectAddendumCost->setAddedBy(null);
  532.             }
  533.         }
  534.         return $this;
  535.     }
  536.     /**
  537.      * TODO Check this absolutely
  538.      * @return Collection<int, AccessRoles>
  539.      *     @deprecated use user_rights
  540.      */
  541.     public function getUserAccessedRoles(): Collection
  542.     {
  543.         return $this->user_accessed_roles;
  544.     }
  545.     /**
  546.      * @deprecated use user_rights
  547.     */
  548.     public function addUserAccessedRole(AccessRoles $userAccessedRole): self
  549.     {
  550.         if (!$this->user_accessed_roles->contains($userAccessedRole)) {
  551.             $this->user_accessed_roles[] = $userAccessedRole;
  552.         }
  553.         return $this;
  554.     }
  555.     /**
  556.      * @deprecated use user_rights
  557.     */
  558.     public function removeUserAccessedRole(AccessRoles $userAccessedRole): self
  559.     {
  560.         $this->user_accessed_roles->removeElement($userAccessedRole);
  561.         return $this;
  562.     }
  563.     /**
  564.      * @return Collection<int, WorkerTimesheetPayments>
  565.      */
  566.     public function getWorkerTimesheetPayments(): Collection
  567.     {
  568.         return $this->workerTimesheetPayments;
  569.     }
  570.     public function addWorkerTimesheetPayment(WorkerTimesheetPayments $workerTimesheetPayment): self
  571.     {
  572.         if (!$this->workerTimesheetPayments->contains($workerTimesheetPayment)) {
  573.             $this->workerTimesheetPayments[] = $workerTimesheetPayment;
  574.             $workerTimesheetPayment->setPayer($this);
  575.         }
  576.         return $this;
  577.     }
  578.     public function removeWorkerTimesheetPayment(WorkerTimesheetPayments $workerTimesheetPayment): self
  579.     {
  580.         if ($this->workerTimesheetPayments->removeElement($workerTimesheetPayment)) {
  581.             // set the owning side to null (unless already changed)
  582.             if ($workerTimesheetPayment->getPayer() === $this) {
  583.                 $workerTimesheetPayment->setPayer(null);
  584.             }
  585.         }
  586.         return $this;
  587.     }
  588.     /**
  589.      * @return Collection<int, ProjectOrderFeedback>
  590.      */
  591.     public function getProjectOrderFeedback(): Collection
  592.     {
  593.         return $this->projectOrderFeedback;
  594.     }
  595.     public function addProjectOrderFeedback(ProjectOrderFeedback $projectOrderFeedback): self
  596.     {
  597.         if (!$this->projectOrderFeedback->contains($projectOrderFeedback)) {
  598.             $this->projectOrderFeedback[] = $projectOrderFeedback;
  599.             $projectOrderFeedback->setUser($this);
  600.         }
  601.         return $this;
  602.     }
  603.     public function removeProjectOrderFeedback(ProjectOrderFeedback $projectOrderFeedback): self
  604.     {
  605.         if ($this->projectOrderFeedback->removeElement($projectOrderFeedback)) {
  606.             // set the owning side to null (unless already changed)
  607.             if ($projectOrderFeedback->getUser() === $this) {
  608.                 $projectOrderFeedback->setUser(null);
  609.             }
  610.         }
  611.         return $this;
  612.     }
  613.     /**
  614.      * @return Collection<int, ProjectOrders>
  615.      */
  616.     public function getProjectOrders(): Collection
  617.     {
  618.         return $this->projectOrders;
  619.     }
  620.     public function addProjectOrder(ProjectOrders $projectOrder): self
  621.     {
  622.         if (!$this->projectOrders->contains($projectOrder)) {
  623.             $this->projectOrders[] = $projectOrder;
  624.             $projectOrder->setAuthor($this);
  625.         }
  626.         return $this;
  627.     }
  628.     public function removeProjectOrder(ProjectOrders $projectOrder): self
  629.     {
  630.         if ($this->projectOrders->removeElement($projectOrder)) {
  631.             // set the owning side to null (unless already changed)
  632.             if ($projectOrder->getAuthor() === $this) {
  633.                 $projectOrder->setAuthor(null);
  634.             }
  635.         }
  636.         return $this;
  637.     }
  638.     public function isLoginRefused(): ?bool
  639.     {
  640.         return $this->login_refused;
  641.     }
  642.     public function setLoginRefused(?bool $login_refused): self
  643.     {
  644.         $this->login_refused = $login_refused;
  645.         return $this;
  646.     }
  647.     public function getLoginRefusedMessage(): ?string
  648.     {
  649.         return $this->login_refused_message;
  650.     }
  651.     public function setLoginRefusedMessage(?string $login_refused_message): self
  652.     {
  653.         $this->login_refused_message = $login_refused_message;
  654.         return $this;
  655.     }
  656.     public function getInvisibleSince(): ?\DateTimeInterface
  657.     {
  658.         return $this->invisible_since;
  659.     }
  660.     public function setInvisibleSince(?\DateTimeInterface $invisible_since): self
  661.     {
  662.         $this->invisible_since = $invisible_since;
  663.         return $this;
  664.     }
  665.     /**
  666.      * @return Collection<int, UserModulePermissions>&Selectable
  667.      */
  668.     public function getUserModulePermissions(): Collection
  669.     {
  670.         return $this->user_module_permissions;
  671.     }
  672.     public function addUserModulePermission(UserModulePermissions $userModulePermission): self
  673.     {
  674.         if (!$this->user_module_permissions->contains($userModulePermission)) {
  675.             $this->user_module_permissions[] = $userModulePermission;
  676.             $userModulePermission->setUser($this);
  677.         }
  678.         return $this;
  679.     }
  680.     public function removeUserModulePermission(UserModulePermissions $userModulePermission): self
  681.     {
  682.         if ($this->user_module_permissions->removeElement($userModulePermission)) {
  683.             // set the owning side to null (unless already changed)
  684.             if ($userModulePermission->getUser() === $this) {
  685.                 $userModulePermission->setUser(null);
  686.             }
  687.         }
  688.         return $this;
  689.     }
  690.     /**
  691.      * @return Collection<int, Inventory>
  692.      */
  693.     public function getInventories(): Collection
  694.     {
  695.         return $this->inventories;
  696.     }
  697.     public function addInventory(Inventory $inventory): self
  698.     {
  699.         if (!$this->inventories->contains($inventory)) {
  700.             $this->inventories[] = $inventory;
  701.             $inventory->setInvolvedBy($this);
  702.         }
  703.         return $this;
  704.     }
  705.     public function removeInventory(Inventory $inventory): self
  706.     {
  707.         if ($this->inventories->removeElement($inventory)) {
  708.             // set the owning side to null (unless already changed)
  709.             if ($inventory->getInvolvedBy() === $this) {
  710.                 $inventory->setInvolvedBy(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return Collection<int, SupplierOrders>
  717.      */
  718.     public function getSupplierOrders(): Collection
  719.     {
  720.         return $this->supplierOrders;
  721.     }
  722.     public function addSupplierOrder(SupplierOrders $supplierOrder): self
  723.     {
  724.         if (!$this->supplierOrders->contains($supplierOrder)) {
  725.             $this->supplierOrders[] = $supplierOrder;
  726.             $supplierOrder->setOrderBy($this);
  727.         }
  728.         return $this;
  729.     }
  730.     public function removeSupplierOrder(SupplierOrders $supplierOrder): self
  731.     {
  732.         if ($this->supplierOrders->removeElement($supplierOrder)) {
  733.             // set the owning side to null (unless already changed)
  734.             if ($supplierOrder->getOrderBy() === $this) {
  735.                 $supplierOrder->setOrderBy(null);
  736.             }
  737.         }
  738.         return $this;
  739.     }
  740.     /**
  741.      * @return Collection<int, UserScopedItem>
  742.      */
  743.     public function getUserScopedItems(): Collection
  744.     {
  745.         return $this->user_scoped_items;
  746.     }
  747.     public function addUserScopedItems(UserScopedItem $userScopedItem): self
  748.     {
  749.         if (!$this->user_scoped_items->contains($userScopedItem)) {
  750.             $this->user_scoped_items[] = $userScopedItem;
  751.             $userScopedItem->setUser($this);
  752.         }
  753.         return $this;
  754.     }
  755.     public function removeUserScopedItems(UserScopedItem $userScopedItem): self
  756.     {
  757.         if ($this->user_scoped_items->removeElement($userScopedItem)) {
  758.             // set the owning side to null (unless already changed)
  759.             if ($userScopedItem->getUser() === $this) {
  760.                 $userScopedItem->setUser(null);
  761.             }
  762.         }
  763.         return $this;
  764.     }
  765.     public function getWorker(): ?Worker
  766.     {
  767.         return $this->worker;
  768.     }
  769.     public function setWorker(?Worker $worker): self
  770.     {
  771.         // unset the owning side of the relation if necessary
  772.         if ($worker === null && $this->worker !== null) {
  773.             $this->worker->setUser(null);
  774.         }
  775.         // set the owning side of the relation if necessary
  776.         if ($worker !== null && $worker->getUser() !== $this) {
  777.             $worker->setUser($this);
  778.         }
  779.         $this->worker = $worker;
  780.         return $this;
  781.     }
  782.     /**
  783.      * @return Collection<int, UserCalculationPermission>
  784.      */
  785.     public function getUserCalculationPermissions(): Collection
  786.     {
  787.         return $this->user_calculation_permissions;
  788.     }
  789.     public function addUserCalculationPermission(UserCalculationPermission $userCalculationPermission): self
  790.     {
  791.         if (!$this->user_calculation_permissions->contains($userCalculationPermission)) {
  792.             $this->user_calculation_permissions[] = $userCalculationPermission;
  793.             $userCalculationPermission->setUser($this);
  794.         }
  795.         return $this;
  796.     }
  797.     public function removeUserCalculationPermission(UserCalculationPermission $userCalculationPermission): self
  798.     {
  799.         if ($this->user_calculation_permissions->removeElement($userCalculationPermission)) {
  800.             // set the owning side to null (unless already changed)
  801.             if ($userCalculationPermission->getUser() === $this) {
  802.                 $userCalculationPermission->setUser(null);
  803.             }
  804.         }
  805.         return $this;
  806.     }
  807.     public function getIsPasswordUpdatedAt(): ?\DateTimeImmutable
  808.     {
  809.         return $this->is_password_updated_at;
  810.     }
  811.     public function setIsPasswordUpdatedAt(?\DateTimeImmutable $is_password_updated_at): self
  812.     {
  813.         $this->is_password_updated_at = $is_password_updated_at;
  814.         return $this;
  815.     }
  816.     public function getNewsLastSeenAt(): ?\DateTimeImmutable
  817.     {
  818.         return $this->news_last_seen_at;
  819.     }
  820.     public function setNewsLastSeenAt(?\DateTimeImmutable $news_last_seen_at): self
  821.     {
  822.         $this->news_last_seen_at = $news_last_seen_at;
  823.         return $this;
  824.     }
  825.     public function getUserPosition(): ?UserPositions
  826.     {
  827.         return $this->user_position;
  828.     }
  829.     public function setUserPosition(?UserPositions $user_position): self
  830.     {
  831.         $this->user_position = $user_position;
  832.         return $this;
  833.     }
  834.     public function getIdleTimerTimeout(): ?int
  835.     {
  836.         return $this->idle_timer_timeout;
  837.     }
  838.     public function setIdleTimerTimeout(?int $idle_timer_timeout): self
  839.     {
  840.         $this->idle_timer_timeout = $idle_timer_timeout;
  841.         return $this;
  842.     }
  843.     public function getNotificationPreferences(): ?array
  844.     {
  845.         return $this->notification_preferences;
  846.     }
  847.     public function setNotificationPreferences(?array $notification_preferences): self
  848.     {
  849.         $this->notification_preferences = $notification_preferences;
  850.         return $this;
  851.     }
  852.     public function getUiPreferences(): ?array
  853.     {
  854.         return $this->ui_preferences;
  855.     }
  856.     public function setUiPreferences(?array $ui_preferences): self
  857.     {
  858.         $this->ui_preferences = $ui_preferences;
  859.         return $this;
  860.     }
  861.     public function getEmailSignature(): ?string
  862.     {
  863.         return $this->email_signature;
  864.     }
  865.     public function setEmailSignature(?string $email_signature): self
  866.     {
  867.         $this->email_signature = $email_signature;
  868.         return $this;
  869.     }
  870.     /**
  871.      * @return Collection<int, WorkerActivities>
  872.      */
  873.     public function getWorkerActivities(): Collection
  874.     {
  875.         return $this->worker_activities;
  876.     }
  877.     public function addWorkerActivity(WorkerActivities $workerActivity): self
  878.     {
  879.         if (!$this->worker_activities->contains($workerActivity)) {
  880.             $this->worker_activities[] = $workerActivity;
  881.             $workerActivity->setUser($this);
  882.         }
  883.         return $this;
  884.     }
  885.     public function removeWorkerActivity(WorkerActivities $workerActivity): self
  886.     {
  887.         if ($this->worker_activities->removeElement($workerActivity)) {
  888.             // set the owning side to null (unless already changed)
  889.             if ($workerActivity->getUser() === $this) {
  890.                 $workerActivity->setUser(null);
  891.             }
  892.         }
  893.         return $this;
  894.     }
  895.     /**
  896.      * @return Collection<int, PurchaseRequest>
  897.      */
  898.     public function getPurchaseRequestsRequester(): Collection
  899.     {
  900.         return $this->purchase_requests_requester;
  901.     }
  902.     public function addPurchaseRequestForRequester(PurchaseRequest $purchaseRequest): self
  903.     {
  904.         if (!$this->purchase_requests_requester->contains($purchaseRequest)) {
  905.             $this->purchase_requests_requester[] = $purchaseRequest;
  906.             $purchaseRequest->setRequester($this);
  907.         }
  908.         return $this;
  909.     }
  910.     public function removePurchaseRequestFromRequester(PurchaseRequest $purchaseRequest): self
  911.     {
  912.         if ($this->purchase_requests_requester->removeElement($purchaseRequest)) {
  913.             // set the owning side to null (unless already changed)
  914.             if ($purchaseRequest->getRequester() === $this) {
  915.                 $purchaseRequest->setRequester(null);
  916.             }
  917.         }
  918.         return $this;
  919.     }
  920.     /**
  921.      * @return Collection<int, PurchaseRequest>
  922.      */
  923.     public function getPurchaseRequestsApprover(): Collection
  924.     {
  925.         return $this->purchase_requests_approver;
  926.     }
  927.     public function addPurchaseRequestForApprover(PurchaseRequest $purchaseRequest): self
  928.     {
  929.         if (!$this->purchase_requests_approver->contains($purchaseRequest)) {
  930.             $this->purchase_requests_approver[] = $purchaseRequest;
  931.             $purchaseRequest->setApprover($this);
  932.         }
  933.         return $this;
  934.     }
  935.     public function removePurchaseRequestFromApprover(PurchaseRequest $purchaseRequest): self
  936.     {
  937.         if ($this->purchase_requests_approver->removeElement($purchaseRequest)) {
  938.             // set the owning side to null (unless already changed)
  939.             if ($purchaseRequest->getApprover() === $this) {
  940.                 $purchaseRequest->setApprover(null);
  941.             }
  942.         }
  943.         return $this;
  944.     }
  945.     /**
  946.      * @return Collection<int, PurchaseRequestPositionHistoryRead>
  947.      */
  948.     public function getPositionPurchaseRequestPositionHistoryReads(): Collection
  949.     {
  950.         return $this->purchase_request_position_history_reads;
  951.     }
  952.     public function addPurchaseRequestHistoryRead(PurchaseRequestPositionHistoryRead $purchaseRequestPositionHistoryRead): self
  953.     {
  954.         if (!$this->purchase_request_position_history_reads->contains($purchaseRequestPositionHistoryRead)) {
  955.             $this->purchase_request_position_history_reads[] = $purchaseRequestPositionHistoryRead;
  956.             $purchaseRequestPositionHistoryRead->setUser($this);
  957.         }
  958.         return $this;
  959.     }
  960.     public function removePurchaseRequestHistoryRead(PurchaseRequestPositionHistoryRead $purchaseRequestPositionHistoryRead): self
  961.     {
  962.         if ($this->purchase_request_position_history_reads->removeElement($purchaseRequestPositionHistoryRead)) {
  963.             // set the owning side to null (unless already changed)
  964.             if ($purchaseRequestPositionHistoryRead->getUser() === $this) {
  965.                 $purchaseRequestPositionHistoryRead->setUser(null);
  966.             }
  967.         }
  968.         return $this;
  969.     }
  970.     /**
  971.      * @return Collection<int, PurchaseRequestHistoryRead>
  972.      */
  973.     public function getPurchaseRequestHistoryReads(): Collection
  974.     {
  975.         return $this->purchase_request_history_reads;
  976.     }
  977.     /**
  978.      * @return Collection<int, PurchaseRequestHistories>
  979.      */
  980.     public function getPurchaseRequestHistories(): Collection
  981.     {
  982.         return $this->purchaseRequestHistories;
  983.     }
  984.     public function addPurchaseRequestHistory(PurchaseRequestHistories $purchaseRequestHistory): self
  985.     {
  986.         if (!$this->purchaseRequestHistories->contains($purchaseRequestHistory)) {
  987.             $this->purchaseRequestHistories[] = $purchaseRequestHistory;
  988.             $purchaseRequestHistory->setOwner($this);
  989.         }
  990.         return $this;
  991.     }
  992.     public function removePurchaseRequestHistory(PurchaseRequestHistories $purchaseRequestHistory): self
  993.     {
  994.         if ($this->purchaseRequestHistories->removeElement($purchaseRequestHistory)) {
  995.             // set the owning side to null (unless already changed)
  996.             if ($purchaseRequestHistory->getOwner() === $this) {
  997.                 $purchaseRequestHistory->setOwner(null);
  998.             }
  999.         }
  1000.         return $this;
  1001.     }
  1002.     /**
  1003.      * @return Collection<int, PurchaseRequestUserFavorites>
  1004.      */
  1005.     public function getPurchaseRequestUserFavorites(): Collection
  1006.     {
  1007.         return $this->purchaseRequestUserFavorites;
  1008.     }
  1009.     public function addPurchaseRequestUserFavorite(PurchaseRequestUserFavorites $purchaseRequestUserFavorite): self
  1010.     {
  1011.         if (!$this->purchaseRequestUserFavorites->contains($purchaseRequestUserFavorite)) {
  1012.             $this->purchaseRequestUserFavorites[] = $purchaseRequestUserFavorite;
  1013.             $purchaseRequestUserFavorite->setUser($this);
  1014.         }
  1015.         return $this;
  1016.     }
  1017.     public function removePurchaseRequestUserFavorite(PurchaseRequestUserFavorites $purchaseRequestUserFavorite): self
  1018.     {
  1019.         if ($this->purchaseRequestUserFavorites->removeElement($purchaseRequestUserFavorite)) {
  1020.             // set the owning side to null (unless already changed)
  1021.             if ($purchaseRequestUserFavorite->getUser() === $this) {
  1022.                 $purchaseRequestUserFavorite->setUser(null);
  1023.             }
  1024.         }
  1025.         return $this;
  1026.     }
  1027.     /**
  1028.      * @return Collection<int, PurchaseRequestPositions>
  1029.      */
  1030.     public function getPurchaseRequestPositionsApprover(): Collection
  1031.     {
  1032.         return $this->purchase_request_positions_approver;
  1033.     }
  1034.     public function addPurchaseRequestPositionsApprover(PurchaseRequestPositions $purchaseRequestPositionsApprover): self
  1035.     {
  1036.         if (!$this->purchase_request_positions_approver->contains($purchaseRequestPositionsApprover)) {
  1037.             $this->purchase_request_positions_approver[] = $purchaseRequestPositionsApprover;
  1038.             $purchaseRequestPositionsApprover->setApprover($this);
  1039.         }
  1040.         return $this;
  1041.     }
  1042.     public function removePurchaseRequestPositionsApprover(PurchaseRequestPositions $purchaseRequestPositionsApprover): self
  1043.     {
  1044.         if ($this->purchase_request_positions_approver->removeElement($purchaseRequestPositionsApprover)) {
  1045.             // set the owning side to null (unless already changed)
  1046.             if ($purchaseRequestPositionsApprover->getApprover() === $this) {
  1047.                 $purchaseRequestPositionsApprover->setApprover(null);
  1048.             }
  1049.         }
  1050.         return $this;
  1051.     }
  1052.     /**
  1053.      * @return Collection<int, PurchaseRequestPositions>
  1054.      */
  1055.     public function getPurchaseRequestPositionsRejecter(): Collection
  1056.     {
  1057.         return $this->purchase_request_positions_rejecter;
  1058.     }
  1059.     public function addPurchaseRequestPositionsRejecter(PurchaseRequestPositions $purchaseRequestPositionsRejecter): self
  1060.     {
  1061.         if (!$this->purchase_request_positions_rejecter->contains($purchaseRequestPositionsRejecter)) {
  1062.             $this->purchase_request_positions_rejecter[] = $purchaseRequestPositionsRejecter;
  1063.             $purchaseRequestPositionsRejecter->setRejecter($this);
  1064.         }
  1065.         return $this;
  1066.     }
  1067.     public function removePurchaseRequestPositionsRejecter(PurchaseRequestPositions $purchaseRequestPositionsRejecter): self
  1068.     {
  1069.         if ($this->purchase_request_positions_rejecter->removeElement($purchaseRequestPositionsRejecter)) {
  1070.             // set the owning side to null (unless already changed)
  1071.             if ($purchaseRequestPositionsRejecter->getRejecter() === $this) {
  1072.                 $purchaseRequestPositionsRejecter->setRejecter(null);
  1073.             }
  1074.         }
  1075.         return $this;
  1076.     }
  1077.     /**
  1078.      * @return Collection<int, PurchaseRequest>
  1079.      */
  1080.     public function getPurchaseRequestRejecter(): Collection
  1081.     {
  1082.         return $this->purchase_request_rejecter;
  1083.     }
  1084.     public function addPurchaseRequestRejecter(PurchaseRequest $purchaseRequestRejecter): self
  1085.     {
  1086.         if (!$this->purchase_request_rejecter->contains($purchaseRequestRejecter)) {
  1087.             $this->purchase_request_rejecter[] = $purchaseRequestRejecter;
  1088.             $purchaseRequestRejecter->setRejecter($this);
  1089.         }
  1090.         return $this;
  1091.     }
  1092.     public function removePurchaseRequestRejecter(PurchaseRequest $purchaseRequestRejecter): self
  1093.     {
  1094.         if ($this->purchase_request_rejecter->removeElement($purchaseRequestRejecter)) {
  1095.             // set the owning side to null (unless already changed)
  1096.             if ($purchaseRequestRejecter->getRejecter() === $this) {
  1097.                 $purchaseRequestRejecter->setRejecter(null);
  1098.             }
  1099.         }
  1100.         return $this;
  1101.     }
  1102.     /**
  1103.      * @return Collection<int, Warehouses>
  1104.      */
  1105.     public function getWarehouses(): Collection
  1106.     {
  1107.         return $this->warehouses;
  1108.     }
  1109.     public function addWarehouse(Warehouses $warehouse): self
  1110.     {
  1111.         if (!$this->warehouses->contains($warehouse)) {
  1112.             $this->warehouses[] = $warehouse;
  1113.             $warehouse->setCreator($this);
  1114.         }
  1115.         return $this;
  1116.     }
  1117.     public function removeWarehouse(Warehouses $warehouse): self
  1118.     {
  1119.         if ($this->warehouses->removeElement($warehouse)) {
  1120.             // set the owning side to null (unless already changed)
  1121.             if ($warehouse->getCreator() === $this) {
  1122.                 $warehouse->setCreator(null);
  1123.             }
  1124.         }
  1125.         return $this;
  1126.     }
  1127.     /**
  1128.      * @return Collection<int, StockIssue>
  1129.      */
  1130.     public function getStockOutIssues(): Collection
  1131.     {
  1132.         return $this->stock_out_issues;
  1133.     }
  1134.     public function addStockOutIssue(StockIssue $stockOutIssue): self
  1135.     {
  1136.         if (!$this->stock_out_issues->contains($stockOutIssue)) {
  1137.             $this->stock_out_issues[] = $stockOutIssue;
  1138.             $stockOutIssue->setIssuedBy($this);
  1139.         }
  1140.         return $this;
  1141.     }
  1142.     public function removeStockOutIssue(StockIssue $stockOutIssue): self
  1143.     {
  1144.         if ($this->stock_out_issues->removeElement($stockOutIssue)) {
  1145.             // set the owning side to null (unless already changed)
  1146.             if ($stockOutIssue->getIssuedBy() === $this) {
  1147.                 $stockOutIssue->setIssuedBy(null);
  1148.             }
  1149.         }
  1150.         return $this;
  1151.     }
  1152.     /**
  1153.      * @return Collection<int, StockIssuePositions>
  1154.      */
  1155.     public function getDeliveredStockIssuePositions(): Collection
  1156.     {
  1157.         return $this->delivered_stock_issue_positions;
  1158.     }
  1159.     public function addDeliveredStockIssuePosition(StockIssuePositions $deliveredStockIssuePosition): self
  1160.     {
  1161.         if (!$this->delivered_stock_issue_positions->contains($deliveredStockIssuePosition)) {
  1162.             $this->delivered_stock_issue_positions[] = $deliveredStockIssuePosition;
  1163.             $deliveredStockIssuePosition->setDeliverer($this);
  1164.         }
  1165.         return $this;
  1166.     }
  1167.     public function removeDeliveredStockIssuePosition(StockIssuePositions $deliveredStockIssuePosition): self
  1168.     {
  1169.         if ($this->delivered_stock_issue_positions->removeElement($deliveredStockIssuePosition)) {
  1170.             // set the owning side to null (unless already changed)
  1171.             if ($deliveredStockIssuePosition->getDeliverer() === $this) {
  1172.                 $deliveredStockIssuePosition->setDeliverer(null);
  1173.             }
  1174.         }
  1175.         return $this;
  1176.     }
  1177.     /**
  1178.      * @return Collection<int, ProjectAIReports>
  1179.      */
  1180.     public function getProjectAiReports(): Collection
  1181.     {
  1182.         return $this->project_ai_reports;
  1183.     }
  1184.     public function addProjectAiReport(ProjectAIReports $projectAiReport): self
  1185.     {
  1186.         if (!$this->project_ai_reports->contains($projectAiReport)) {
  1187.             $this->project_ai_reports[] = $projectAiReport;
  1188.             $projectAiReport->setAnalyseBy($this);
  1189.         }
  1190.         return $this;
  1191.     }
  1192.     public function removeProjectAiReport(ProjectAIReports $projectAiReport): self
  1193.     {
  1194.         if ($this->project_ai_reports->removeElement($projectAiReport)) {
  1195.             // set the owning side to null (unless already changed)
  1196.             if ($projectAiReport->getAnalyseBy() === $this) {
  1197.                 $projectAiReport->setAnalyseBy(null);
  1198.             }
  1199.         }
  1200.         return $this;
  1201.     }
  1202.     /**
  1203.      * @return Collection<int, Invoices>
  1204.      */
  1205.     public function getInvoices(): Collection
  1206.     {
  1207.         return $this->invoices;
  1208.     }
  1209.     public function addInvoice(Invoices $invoice): self
  1210.     {
  1211.         if (!$this->invoices->contains($invoice)) {
  1212.             $this->invoices[] = $invoice;
  1213.             $invoice->setAdder($this);
  1214.         }
  1215.         return $this;
  1216.     }
  1217.     public function removeInvoice(Invoices $invoice): self
  1218.     {
  1219.         if ($this->invoices->removeElement($invoice)) {
  1220.             // set the owning side to null (unless already changed)
  1221.             if ($invoice->getAdder() === $this) {
  1222.                 $invoice->setAdder(null);
  1223.             }
  1224.         }
  1225.         return $this;
  1226.     }
  1227.     /**
  1228.      * @return Collection<int, ProjectOrderBillings>
  1229.      */
  1230.     public function getProjectOrderBillings(): Collection
  1231.     {
  1232.         return $this->project_order_billings;
  1233.     }
  1234.     public function addProjectOrderBilling(ProjectOrderBillings $projectOrderBilling): self
  1235.     {
  1236.         if (!$this->project_order_billings->contains($projectOrderBilling)) {
  1237.             $this->project_order_billings[] = $projectOrderBilling;
  1238.             $projectOrderBilling->setAdder($this);
  1239.         }
  1240.         return $this;
  1241.     }
  1242.     public function removeProjectOrderBilling(ProjectOrderBillings $projectOrderBilling): self
  1243.     {
  1244.         if ($this->project_order_billings->removeElement($projectOrderBilling)) {
  1245.             // set the owning side to null (unless already changed)
  1246.             if ($projectOrderBilling->getAdder() === $this) {
  1247.                 $projectOrderBilling->setAdder(null);
  1248.             }
  1249.         }
  1250.         return $this;
  1251.     }
  1252.     /**
  1253.      * @return Collection<int, UserServiceAccess>
  1254.      */
  1255.     public function getServiceAccesses(): Collection
  1256.     {
  1257.         return $this->service_accesses;
  1258.     }
  1259.     public function addServiceAccess(UserServiceAccess $serviceAccess): self
  1260.     {
  1261.         if (!$this->service_accesses->contains($serviceAccess)) {
  1262.             $this->service_accesses[] = $serviceAccess;
  1263.             $serviceAccess->setUser($this);
  1264.         }
  1265.         return $this;
  1266.     }
  1267.     public function removeServiceAccess(UserServiceAccess $serviceAccess): self
  1268.     {
  1269.         if ($this->service_accesses->removeElement($serviceAccess)) {
  1270.             if ($serviceAccess->getUser() === $this) {
  1271.                 $serviceAccess->setUser(null);
  1272.             }
  1273.         }
  1274.         return $this;
  1275.     }
  1276.     /**
  1277.      * @return Collection<int, UserGlobalPasswordAccess>
  1278.      */
  1279.     public function getGlobalPasswordAccesses(): Collection
  1280.     {
  1281.         return $this->global_password_accesses;
  1282.     }
  1283.     public function addGlobalPasswordAccess(UserGlobalPasswordAccess $globalPasswordAccess): self
  1284.     {
  1285.         if (!$this->global_password_accesses->contains($globalPasswordAccess)) {
  1286.             $this->global_password_accesses[] = $globalPasswordAccess;
  1287.             $globalPasswordAccess->setUser($this);
  1288.         }
  1289.         return $this;
  1290.     }
  1291.     public function removeGlobalPasswordAccess(UserGlobalPasswordAccess $globalPasswordAccess): self
  1292.     {
  1293.         if ($this->global_password_accesses->removeElement($globalPasswordAccess)) {
  1294.             if ($globalPasswordAccess->getUser() === $this) {
  1295.                 $globalPasswordAccess->setUser(null);
  1296.             }
  1297.         }
  1298.         return $this;
  1299.     }
  1300. }