src/Entity/User.php line 71

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use ApiPlatform\Metadata\ApiFilter;
  6. use ApiPlatform\Metadata\ApiProperty;
  7. use ApiPlatform\Metadata\ApiResource;
  8. use ApiPlatform\Metadata\Delete;
  9. use ApiPlatform\Metadata\Get;
  10. use ApiPlatform\Metadata\GetCollection;
  11. use ApiPlatform\Metadata\Patch;
  12. use ApiPlatform\Metadata\Post;
  13. use ApiPlatform\Metadata\Put;
  14. use Doctrine\DBAL\Types\Types;
  15. use Doctrine\ORM\Mapping as ORM;
  16. use App\Repository\UserRepository;
  17. use App\State\UserPasswordHasher;
  18. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  19. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  20. use Symfony\Component\Security\Core\User\UserInterface;
  21. use Symfony\Component\Serializer\Annotation\Groups;
  22. use Symfony\Component\Validator\Constraints as Assert;
  23. use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
  24. use App\Controller\UserController;
  25. use App\Filter\CustomOrFilter// Змініть імпорт на правильний
  26. // use ApiPlatform\Core\Metadata\Reswource\DeprecationMetadata;
  27. #[ORM\Table(name'users')]
  28. #[ApiResource(
  29.     operations: [
  30.         new GetCollection(),
  31.         new Post(processorUserPasswordHasher::class, validationContext: ['groups' => ['Default''user:create']]),
  32.         new Get(),
  33.         new Put(processorUserPasswordHasher::class),
  34.         new Patch(processorUserPasswordHasher::class),
  35.         new Post(
  36.             name'me'
  37.             uriTemplate'/users/me'
  38.             controllerUserController::class
  39.         ),
  40.         new Get(
  41.             name'user_search'
  42.             uriTemplate'/user/search'
  43.             controllerUserController::class
  44.         )
  45.     ],
  46.     normalizationContext: ['groups' => ['user:read']],
  47.     denormalizationContext: ['groups' => ['user:create''user:update']],
  48. )]
  49. #[ORM\Entity(repositoryClassUserRepository::class)]
  50. #[UniqueEntity(fields: ['username'], message'There is already an account with this username')]
  51. #[ApiFilter(CustomOrFilter::class,properties: [
  52.     'username' => 'ipartial'
  53.     'firstName' => 'ipartial'
  54.     'lastName' => 'ipartial',
  55.     'codeUser' => 'exact',
  56.     'codeManager' => 'exact',
  57. ])]
  58. #[ApiFilter(SearchFilter::class, properties: [
  59.     'accounts.manager.id' => 'exact',
  60.     'userType' => 'exact',
  61. ])]
  62. class User implements UserInterfacePasswordAuthenticatedUserInterface
  63. {
  64.     #[ORM\Id]
  65.     #[ORM\GeneratedValue]
  66.     #[ORM\Column]
  67.     #[Groups(['user:read''read''account:read''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''product_storage_balance:read'])]
  68.     private ?int $id null;
  69.     #[ORM\Column(length180uniquetrue)]
  70.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  71.     private ?string $username null;
  72.     #[Groups(['user:read''user:update'])]
  73.     #[ORM\Column]
  74.     private array $roles = [];
  75.     /**
  76.      * @var string The hashed password
  77.      */
  78.     #[ORM\Column]
  79.     private ?string $password null;
  80.     #[Assert\NotBlank(groups: ['user:create'])]
  81.     #[Groups(['user:create''user:update'])]
  82.     private ?string $plainPassword null;
  83.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'firstName')]
  84.     private ?self $manager null;
  85.     #[Groups(['user:read''user:create''user:update''read''account:read''account:write''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''product_storage_balance:read'])]
  86.     #[ORM\Column(length255nullabletrue)]
  87.     private ?string $firstName  null;
  88.     #[Groups(['user:read''user:create''user:update''read''account:read''account:write''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''product_storage_balance:read'])]
  89.     #[ORM\Column(length255nullabletrue)]
  90.     private ?string $lastName null;
  91.     #[Groups(['user:read''user:create''user:update''account:read'])]
  92.     #[ORM\Column(length100nullabletrue)]
  93.     private ?string $phone null;
  94.     #[Groups(['user:read''user:create''user:update'])]
  95.     #[ORM\Column(length255nullabletrue)]
  96.     private ?string $address null
  97.     #[Groups(['user:read''user:create''user:update'])]
  98.     #[ORM\Column(length50nullabletrue)]
  99.     private ?string $status null;
  100.     #[ORM\OneToMany(mappedBy'user'targetEntityUserLikeList::class)]
  101.     private Collection $userLikeLists;
  102.     #[ORM\OneToMany(mappedBy'modified_user'targetEntityProducts::class)]
  103.     private Collection $products;
  104.     #[ORM\OneToMany(mappedBy'created_by'targetEntityProducts::class)]
  105.     private Collection $create_products;
  106.     #[ORM\OneToMany(mappedBy'user'targetEntityOrders::class)]
  107.     private Collection $orders;
  108.     #[ORM\OneToMany(mappedBy'manager'targetEntityOrders::class)]
  109.     private Collection $managerOrders;
  110.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  111.     #[ORM\Column(length255nullabletrue)]
  112.     private ?string $email null;
  113.     #[Groups(['user:read''user:create''user:update''read'])]
  114.     #[ORM\OneToMany(mappedBy'user'targetEntityAccounts::class)]
  115.     private Collection $accounts;
  116.     #[ORM\OneToMany(mappedBy'client'targetEntityLoadInvoice::class)]
  117.     private Collection $loadInvoices;
  118.     #[ORM\OneToMany(mappedBy'manager'targetEntityAccepted::class)]
  119.     private Collection $accepteds;
  120.     #[ORM\OneToMany(mappedBy'modified_user'targetEntityAcceptedProduct::class)]
  121.     private Collection $n;
  122.     #[ORM\Column(length20nullabletrue)]
  123.     #[Groups(['user:read''user:create''user:update''order:read''order_product:read'])]
  124.     private ?string $codeUser null;
  125.     #[ORM\Column(length20nullabletrue)]
  126.     #[Groups(['user:read''user:create''user:update''order:read''order_product:read'])]
  127.     private ?string $codeManager null;
  128.     #[ORM\OneToMany(mappedBy'manager'targetEntityAccounts::class)]
  129.     private Collection $managerAccounts;
  130.     #[ORM\OneToMany(mappedBy'client'targetEntityPreOrder::class)]
  131.     private Collection $preOrders;
  132.     #[ORM\OneToMany(mappedBy'manager'targetEntityPreOrder::class)]
  133.     private Collection $ManagerPreOrders;
  134.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  135.     #[ORM\Column(length255nullabletrue)]
  136.     private ?string $workSchedule null;
  137.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  138.     #[ORM\Column(length255nullabletrue)]
  139.     private ?string $telegram null;
  140.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  141.     #[ORM\Column(length255nullabletrue)]
  142.     private ?string $viber null;
  143.     #[Groups(['user:read''user:create''user:update''read''account:read'])]
  144.     #[ORM\OneToMany(mappedBy'users'targetEntityMediaObject::class)]
  145.     private Collection $mediaObjects;
  146.     #[ORM\ManyToMany(targetEntityCoupons::class, mappedBy'users')]
  147.     private Collection $coupons;
  148.     #[ORM\OneToMany(mappedBy'manager'targetEntityProductBalanceInStorage::class)]
  149.     private Collection $productBalanceInStorages;
  150.     #[Groups(['user:read''user:create''user:update'])]
  151.     #[ORM\Column(length255nullabletrue)]
  152.     private ?string $employed null;
  153.     #[Groups(['user:read''user:create''user:update'])]
  154.     #[ORM\Column(length255nullabletrue)]
  155.     private ?string $age null;
  156.     #[Groups(['user:read''user:create''user:update'])]
  157.     #[ORM\Column(length255nullabletrue)]
  158.     private ?string $exDirector null;
  159.     #[Groups(['user:read''user:create''user:update'])]
  160.     #[ORM\Column(length255nullabletrue)]
  161.     private ?string $currentDirector null;
  162.     #[Groups(['user:read''user:create''user:update'])]
  163.     #[ORM\Column(length255nullabletrue)]
  164.     private ?string $gender null;
  165.     #[Groups(['user:read''user:create''user:update'])]
  166.     #[ORM\Column(options: ["default" => '[]'])]
  167.     private array $supportType = [];
  168.      #[Groups(['user:read''user:create''user:update'])]
  169.     #[ORM\Column(length255nullabletrue)]
  170.     private ?string $addressFrom null;
  171.     #[Groups(['user:read''user:create''user:update'])]
  172.     #[ORM\Column(length255nullabletrue)]
  173.     private ?string $anotherProgram null;
  174.     #[Groups(['user:read''user:create''user:update'])]
  175.     #[ORM\Column(length255nullabletrue)]
  176.     private ?string $regionFrom null;
  177.     #[Groups(['user:read''user:create''user:update'])]
  178.     #[ORM\Column(length255nullabletrue)]
  179.     private ?string $numberFOP null;
  180.     #[Groups(['user:read''user:create''user:update'])]
  181.     #[ORM\Column(length255nullabletrue)]
  182.     private ?string $codeEDRPOU null;
  183.     #[Groups(['user:read''user:create''user:update'])]
  184.     #[ORM\Column(length255nullabletrue)]
  185.     private ?string $grantSupport null;
  186.     #[Groups(['user:read''user:create''user:update'])]
  187.     #[ORM\Column(length255nullabletrue)]
  188.     private ?string $companyName null;
  189.     #[Groups(['user:read''user:create''user:update'])]
  190.     #[ORM\Column(length255nullabletrue)]
  191.     private ?string $userType null;
  192.     #[Groups(['user:read''user:create''user:update'])]
  193.     #[ORM\Column(nullabletrue)]
  194.     private ?bool $isSentForPYSupport null;
  195.     #[ORM\Column(length100nullabletrue)]
  196.     private ?string $hash null;
  197.     #[Groups(['user:read''user:create''user:update''read''account:read''account:write''order:read''order_product:read''pre_order_product:read''pre_order:read''load_invoice:read''load_invocie:read''product_storage_balance:read'])]
  198.     #[ORM\Column(nullabletrue)]
  199.     private ?bool $emailVerified null;
  200.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  201.     private ?\DateTimeInterface $hashDate null;
  202.     public function __construct()
  203.     {
  204.         $this->userLikeLists = new ArrayCollection();
  205.         $this->products = new ArrayCollection();
  206.         $this->create_products = new ArrayCollection();
  207.         $this->orders = new ArrayCollection();
  208.         $this->managerOrders = new ArrayCollection();
  209.         $this->accounts = new ArrayCollection();
  210.         $this->loadInvoices = new ArrayCollection();
  211.         $this->accepteds = new ArrayCollection();
  212.         $this->= new ArrayCollection();
  213.         $this->managerAccounts = new ArrayCollection();
  214.         $this->preOrders = new ArrayCollection();
  215.         $this->ManagerPreOrders = new ArrayCollection();
  216.         $this->mediaObjects = new ArrayCollection();
  217.         $this->coupons = new ArrayCollection();
  218.         $this->productBalanceInStorages = new ArrayCollection();
  219.     }
  220.     public function getId(): ?int
  221.     {
  222.         return $this->id;
  223.     }
  224.     /**
  225.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  226.      */
  227.     public function getUsername(): string
  228.     {
  229.         return (string) $this->username;
  230.     }
  231.     public function setUsername(string $username): self
  232.     {
  233.         $this->username $username;
  234.         return $this;
  235.     }
  236.     /**
  237.      * A visual identifier that represents this user.
  238.      *
  239.      * @see UserInterface
  240.      */
  241.     public function getUserIdentifier(): string
  242.     {
  243.         return (string) $this->username;
  244.     }
  245.     /**
  246.      * @see UserInterface
  247.      */
  248.     public function getRoles(): array
  249.     {
  250.         $roles $this->roles;
  251.         // guarantee every user at least has ROLE_USER
  252.         $roles[] = 'ROLE_USER';
  253.         return array_unique($roles);
  254.     }
  255.     public function setRoles(array $roles): self
  256.     {
  257.         $this->roles $roles;
  258.         return $this;
  259.     }
  260.     /**
  261.      * @see PasswordAuthenticatedUserInterface
  262.      */
  263.     public function getPassword(): string
  264.     {
  265.         return $this->password;
  266.     }
  267.     public function setPassword(string $password): self
  268.     {
  269.         $this->password $password;
  270.         return $this;
  271.     }
  272.     public function getPlainPassword(): ?string
  273.     {
  274.         return $this->plainPassword;
  275.     }
  276.     public function setPlainPassword(?string $plainPassword): self
  277.     {
  278.         $this->plainPassword $plainPassword;
  279.         return $this;
  280.     }
  281.     /**
  282.      * Returning a salt is only needed, if you are not using a modern
  283.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  284.      *
  285.      * @see UserInterface
  286.      */
  287.     public function getSalt(): ?string
  288.     {
  289.         return null;
  290.     }
  291.     /**
  292.      * @see UserInterface
  293.      */
  294.     public function eraseCredentials()
  295.     {
  296.         // If you store any temporary, sensitive data on the user, clear it here
  297.         $this->plainPassword null;
  298.     }
  299.     public function getManagerId(): ?self
  300.     {
  301.         return $this->manager;
  302.     }
  303.     public function setManagerId(?self $manager): self
  304.     {
  305.         $this->manager $manager;
  306.         return $this;
  307.     }
  308.     
  309.     public function getFirstName(): ?string
  310.     {
  311.         return $this->firstName;
  312.     }
  313.     public function setFirstName(string $firstName): self
  314.     {
  315.         $this->firstName $firstName;
  316.         return $this;
  317.     }
  318.     public function getLastName(): ?string
  319.     {
  320.         return $this->lastName;
  321.     }
  322.     public function setLastName(string $lastName): self
  323.     {
  324.         $this->lastName $lastName;
  325.         return $this;
  326.     }
  327.     public function getPhone(): ?string
  328.     {
  329.         return $this->phone;
  330.     }
  331.     public function setPhone(?string $phone): self
  332.     {
  333.         $this->phone $phone;
  334.         return $this;
  335.     }
  336.     public function getAddress(): ?string
  337.     {
  338.         return $this->address;
  339.     }
  340.     public function setAddress(?string $address): self
  341.     {
  342.         $this->address $address;
  343.         return $this;
  344.     }
  345.     public function getStatus(): ?string
  346.     {
  347.         return $this->status;
  348.     }
  349.     public function setStatus(?string $status): self
  350.     {
  351.         $this->status $status;
  352.         return $this;
  353.     }
  354.     /**
  355.      * @return Collection<int, UserLikeList>
  356.      */
  357.     public function getUserLikeLists(): Collection
  358.     {
  359.         return $this->userLikeLists;
  360.     }
  361.     public function addUserLikeList(UserLikeList $userLikeList): self
  362.     {
  363.         if (!$this->userLikeLists->contains($userLikeList)) {
  364.             $this->userLikeLists->add($userLikeList);
  365.             $userLikeList->setUserId($this);
  366.         }
  367.         return $this;
  368.     }
  369.     public function removeUserLikeList(UserLikeList $userLikeList): self
  370.     {
  371.         if ($this->userLikeLists->removeElement($userLikeList)) {
  372.             // set the owning side to null (unless already changed)
  373.             if ($userLikeList->getUserId() === $this) {
  374.                 $userLikeList->setUserId(null);
  375.             }
  376.         }
  377.         return $this;
  378.     }
  379.     /**
  380.      * @return Collection<int, Products>
  381.      */
  382.     public function getProducts(): Collection
  383.     {
  384.         return $this->products;
  385.     }
  386.     public function addProduct(Products $product): self
  387.     {
  388.         if (!$this->products->contains($product)) {
  389.             $this->products->add($product);
  390.             $product->setModifiedUserId($this);
  391.         }
  392.         return $this;
  393.     }
  394.     // public function removeProduct(Products $product): self
  395.     // {
  396.     //     if ($this->products->removeElement($product)) {
  397.     //         // set the owning side to null (unless already changed)
  398.     //         if ($product->getModifiedUserId() === $this) {
  399.     //             $product->setModifiedUserId(null);
  400.     //         }
  401.     //     }
  402.     //     return $this;
  403.     // }
  404.     /**
  405.      * @return Collection<int, Products>
  406.      */
  407.     public function getCreateProducts(): Collection
  408.     {
  409.         return $this->create_products;
  410.     }
  411.     public function addCreateProduct(Products $createProduct): self
  412.     {
  413.         if (!$this->create_products->contains($createProduct)) {
  414.             $this->create_products->add($createProduct);
  415.             $createProduct->setCreatedBy($this);
  416.         }
  417.         return $this;
  418.     }
  419.     // public function removeCreateProduct(Products $createProduct): self
  420.     // {
  421.     //     if ($this->create_products->removeElement($createProduct)) {
  422.     //         // set the owning side to null (unless already changed)
  423.     //         if ($createProduct->getCreatedBy() === $this) {
  424.     //             $createProduct->setCreatedBy(null);
  425.     //         }
  426.     //     }
  427.     //     return $this;
  428.     // }
  429.     /**
  430.      * @return Collection<int, Orders>
  431.      */
  432.     public function getOrders(): Collection
  433.     {
  434.         return $this->orders;
  435.     }
  436.     public function addOrder(Orders $order): self
  437.     {
  438.         if (!$this->orders->contains($order)) {
  439.             $this->orders->add($order);
  440.             $order->setUserId($this);
  441.         }
  442.         return $this;
  443.     }
  444.     // public function removeOrder(Orders $order): self
  445.     // {
  446.     //     if ($this->orders->removeElement($order)) {
  447.     //         // set the owning side to null (unless already changed)
  448.     //         if ($order->getUserId() === $this) {
  449.     //             $order->setUserId(null);
  450.     //         }
  451.     //     }
  452.     //     return $this;
  453.     // }
  454.     /**
  455.      * @return Collection<int, Orders>
  456.      */
  457.     public function getManagerOrders(): Collection
  458.     {
  459.         return $this->managerOrders;
  460.     }
  461.     public function addManagerOrder(Orders $managerOrder): self
  462.     {
  463.         if (!$this->managerOrders->contains($managerOrder)) {
  464.             $this->managerOrders->add($managerOrder);
  465.             $managerOrder->setManagerId($this);
  466.         }
  467.         return $this;
  468.     }
  469.     // public function removeManagerOrder(Orders $managerOrder): self
  470.     // {
  471.     //     if ($this->managerOrders->removeElement($managerOrder)) {
  472.     //         // set the owning side to null (unless already changed)
  473.     //         if ($managerOrder->getManagerId() === $this) {
  474.     //             $managerOrder->setManagerId(null);
  475.     //         }
  476.     //     }
  477.     //     return $this;
  478.     // }
  479.     public function getEmail(): ?string
  480.     {
  481.         return $this->email;
  482.     }
  483.     public function setEmail(?string $email): self
  484.     {
  485.         $this->email $email;
  486.         return $this;
  487.     }
  488.     /**
  489.      * @return Collection<int, Accounts>
  490.      */
  491.     public function getAccounts(): Collection
  492.     {
  493.         return $this->accounts;
  494.     }
  495.     public function addAccount(Accounts $account): self
  496.     {
  497.         if (!$this->accounts->contains($account)) {
  498.             $this->accounts->add($account);
  499.             $account->setUserId($this);
  500.         }
  501.         return $this;
  502.     }
  503.     public function removeAccount(Accounts $account): self
  504.     {
  505.         if ($this->accounts->removeElement($account)) {
  506.             // set the owning side to null (unless already changed)
  507.             if ($account->getUserId() === $this) {
  508.                 $account->setUserId(null);
  509.             }
  510.         }
  511.         return $this;
  512.     }
  513.     /**
  514.      * @return Collection<int, LoadInvoice>
  515.      */
  516.     public function getLoadInvoices(): Collection
  517.     {
  518.         return $this->loadInvoices;
  519.     }
  520.     public function addLoadInvoice(LoadInvoice $loadInvoice): self
  521.     {
  522.         if (!$this->loadInvoices->contains($loadInvoice)) {
  523.             $this->loadInvoices->add($loadInvoice);
  524.             $loadInvoice->setClient($this);
  525.         }
  526.         return $this;
  527.     }
  528.     public function removeLoadInvoice(LoadInvoice $loadInvoice): self
  529.     {
  530.         if ($this->loadInvoices->removeElement($loadInvoice)) {
  531.             // set the owning side to null (unless already changed)
  532.             if ($loadInvoice->getClient() === $this) {
  533.                 $loadInvoice->setClient(null);
  534.             }
  535.         }
  536.         return $this;
  537.     }
  538.     /**
  539.      * @return Collection<int, Accepted>
  540.      */
  541.     public function getAccepteds(): Collection
  542.     {
  543.         return $this->accepteds;
  544.     }
  545.     public function addAccepted(Accepted $accepted): self
  546.     {
  547.         if (!$this->accepteds->contains($accepted)) {
  548.             $this->accepteds->add($accepted);
  549.             $accepted->setManager($this);
  550.         }
  551.         return $this;
  552.     }
  553.     public function removeAccepted(Accepted $accepted): self
  554.     {
  555.         if ($this->accepteds->removeElement($accepted)) {
  556.             // set the owning side to null (unless already changed)
  557.             if ($accepted->getManager() === $this) {
  558.                 $accepted->setManager(null);
  559.             }
  560.         }
  561.         return $this;
  562.     }
  563.     /**
  564.      * @return Collection<int, AcceptedProduct>
  565.      */
  566.     public function getN(): Collection
  567.     {
  568.         return $this->n;
  569.     }
  570.     public function addN(AcceptedProduct $n): self
  571.     {
  572.         if (!$this->n->contains($n)) {
  573.             $this->n->add($n);
  574.             $n->setModifiedUser($this);
  575.         }
  576.         return $this;
  577.     }
  578.     public function removeN(AcceptedProduct $n): self
  579.     {
  580.         if ($this->n->removeElement($n)) {
  581.             // set the owning side to null (unless already changed)
  582.             if ($n->getModifiedUser() === $this) {
  583.                 $n->setModifiedUser(null);
  584.             }
  585.         }
  586.         return $this;
  587.     }
  588.     public function getCodeUser(): ?string
  589.     {
  590.         return $this->codeUser;
  591.     }
  592.     public function setCodeUser(string $codeUser): self
  593.     {
  594.         $this->codeUser $codeUser;
  595.         return $this;
  596.     }
  597.     public function getCodeManager(): ?string
  598.     {
  599.         return $this->codeManager;
  600.     }
  601.     public function setCodeManager(string $codeManager): self
  602.     {
  603.         $this->codeManager $codeManager;
  604.         return $this;
  605.     }
  606.     /**
  607.      * @return Collection<int, Accounts>
  608.      */
  609.     public function getManagerAccounts(): Collection
  610.     {
  611.         return $this->managerAccounts;
  612.     }
  613.     public function addManagerAccount(Accounts $managerAccount): self
  614.     {
  615.         if (!$this->managerAccounts->contains($managerAccount)) {
  616.             $this->managerAccounts->add($managerAccount);
  617.             $managerAccount->setManager($this);
  618.         }
  619.         return $this;
  620.     }
  621.     public function removeManagerAccount(Accounts $managerAccount): self
  622.     {
  623.         if ($this->managerAccounts->removeElement($managerAccount)) {
  624.             // set the owning side to null (unless already changed)
  625.             if ($managerAccount->getManager() === $this) {
  626.                 $managerAccount->setManager(null);
  627.             }
  628.         }
  629.         return $this;
  630.     }
  631.     /**
  632.      * @return Collection<int, PreOrder>
  633.      */
  634.     public function getPreOrders(): Collection
  635.     {
  636.         return $this->preOrders;
  637.     }
  638.     public function addPreOrder(PreOrder $preOrder): self
  639.     {
  640.         if (!$this->preOrders->contains($preOrder)) {
  641.             $this->preOrders->add($preOrder);
  642.             $preOrder->setClient($this);
  643.         }
  644.         return $this;
  645.     }
  646.     public function removePreOrder(PreOrder $preOrder): self
  647.     {
  648.         if ($this->preOrders->removeElement($preOrder)) {
  649.             // set the owning side to null (unless already changed)
  650.             if ($preOrder->getClient() === $this) {
  651.                 $preOrder->setClient(null);
  652.             }
  653.         }
  654.         return $this;
  655.     }
  656.     /**
  657.      * @return Collection<int, PreOrder>
  658.      */
  659.     public function getManagerPreOrders(): Collection
  660.     {
  661.         return $this->ManagerPreOrders;
  662.     }
  663.     public function addManagerPreOrder(PreOrder $managerPreOrder): self
  664.     {
  665.         if (!$this->ManagerPreOrders->contains($managerPreOrder)) {
  666.             $this->ManagerPreOrders->add($managerPreOrder);
  667.             $managerPreOrder->setManager($this);
  668.         }
  669.         return $this;
  670.     }
  671.     public function removeManagerPreOrder(PreOrder $managerPreOrder): self
  672.     {
  673.         if ($this->ManagerPreOrders->removeElement($managerPreOrder)) {
  674.             // set the owning side to null (unless already changed)
  675.             if ($managerPreOrder->getManager() === $this) {
  676.                 $managerPreOrder->setManager(null);
  677.             }
  678.         }
  679.         return $this;
  680.     }
  681.     public function getWorkSchedule(): ?string
  682.     {
  683.         return $this->workSchedule;
  684.     }
  685.     public function setWorkSchedule(?string $workSchedule): self
  686.     {
  687.         $this->workSchedule $workSchedule;
  688.         return $this;
  689.     }
  690.     public function getTelegram(): ?string
  691.     {
  692.         return $this->telegram;
  693.     }
  694.     public function setTelegram(?string $telegram): self
  695.     {
  696.         $this->telegram $telegram;
  697.         return $this;
  698.     }
  699.     public function getViber(): ?string
  700.     {
  701.         return $this->viber;
  702.     }
  703.     public function setViber(?string $viber): self
  704.     {
  705.         $this->viber $viber;
  706.         return $this;
  707.     }
  708.     /**
  709.      * @return Collection<int, MediaObject>
  710.      */
  711.     public function getMediaObjects(): Collection
  712.     {
  713.         return $this->mediaObjects;
  714.     }
  715.     public function addMediaObject(MediaObject $mediaObject): self
  716.     {
  717.         if (!$this->mediaObjects->contains($mediaObject)) {
  718.             $this->mediaObjects->add($mediaObject);
  719.             $mediaObject->setUsers($this);
  720.         }
  721.         return $this;
  722.     }
  723.     public function removeMediaObject(MediaObject $mediaObject): self
  724.     {
  725.         if ($this->mediaObjects->removeElement($mediaObject)) {
  726.             // set the owning side to null (unless already changed)
  727.             if ($mediaObject->getUsers() === $this) {
  728.                 $mediaObject->setUsers(null);
  729.             }
  730.         }
  731.         return $this;
  732.     }
  733.     /**
  734.      * @return Collection<int, Coupons>
  735.      */
  736.     public function getCoupons(): Collection
  737.     {
  738.         return $this->coupons;
  739.     }
  740.     public function addCoupon(Coupons $coupon): self
  741.     {
  742.         if (!$this->coupons->contains($coupon)) {
  743.             $this->coupons->add($coupon);
  744.             $coupon->addUser($this);
  745.         }
  746.         return $this;
  747.     }
  748.     public function removeCoupon(Coupons $coupon): self
  749.     {
  750.         if ($this->coupons->removeElement($coupon)) {
  751.             $coupon->removeUser($this);
  752.         }
  753.         return $this;
  754.     }
  755.     /**
  756.      * @return Collection<int, ProductBalanceInStorage>
  757.      */
  758.     public function getProductBalanceInStorages(): Collection
  759.     {
  760.         return $this->productBalanceInStorages;
  761.     }
  762.     public function addProductBalanceInStorage(ProductBalanceInStorage $productBalanceInStorage): self
  763.     {
  764.         if (!$this->productBalanceInStorages->contains($productBalanceInStorage)) {
  765.             $this->productBalanceInStorages->add($productBalanceInStorage);
  766.             $productBalanceInStorage->setManager($this);
  767.         }
  768.         return $this;
  769.     }
  770.     public function removeProductBalanceInStorage(ProductBalanceInStorage $productBalanceInStorage): self
  771.     {
  772.         if ($this->productBalanceInStorages->removeElement($productBalanceInStorage)) {
  773.             // set the owning side to null (unless already changed)
  774.             if ($productBalanceInStorage->getManager() === $this) {
  775.                 $productBalanceInStorage->setManager(null);
  776.             }
  777.         }
  778.         return $this;
  779.     }
  780.     public function getEmployed(): ?string
  781.     {
  782.         return $this->employed;
  783.     }
  784.     public function setEmployed(?string $employed): static
  785.     {
  786.         $this->employed $employed;
  787.         return $this;
  788.     }
  789.     public function getAge(): ?string
  790.     {
  791.         return $this->age;
  792.     }
  793.     public function setAge(?string $age): static
  794.     {
  795.         $this->age $age;
  796.         return $this;
  797.     }
  798.     public function getExDirector(): ?string
  799.     {
  800.         return $this->exDirector;
  801.     }
  802.     public function setExDirector(?string $exDirector): static
  803.     {
  804.         $this->exDirector $exDirector;
  805.         return $this;
  806.     }
  807.     public function getCurrentDirector(): ?string
  808.     {
  809.         return $this->currentDirector;
  810.     }
  811.     public function setCurrentDirector(?string $currentDirector): static
  812.     {
  813.         $this->currentDirector $currentDirector;
  814.         return $this;
  815.     }
  816.     public function getGender(): ?string
  817.     {
  818.         return $this->gender;
  819.     }
  820.     public function setGender(?string $gender): static
  821.     {
  822.         $this->gender $gender;
  823.         return $this;
  824.     }
  825.     public function getSupportType(): array
  826.     {
  827.         return $this->supportType;
  828.     }
  829.     public function setSupportType(?array $supportType): static
  830.     {
  831.         $this->supportType $supportType;
  832.         return $this;
  833.     }
  834.     public function getaddressFrom(): ?string
  835.     {
  836.         return $this->addressFrom;
  837.     }
  838.     public function setaddressFrom(?string $addressFrom): static
  839.     {
  840.         $this->addressFrom $addressFrom;
  841.         return $this;
  842.     }
  843.     public function getAnotherProgram(): ?string
  844.     {
  845.         return $this->anotherProgram;
  846.     }
  847.     public function setAnotherProgram(?string $anotherProgram): static
  848.     {
  849.         $this->anotherProgram $anotherProgram;
  850.         return $this;
  851.     }
  852.     public function getRegionFrom(): ?string
  853.     {
  854.         return $this->regionFrom;
  855.     }
  856.     public function setRegionFrom(?string $regionFrom): static
  857.     {
  858.         $this->regionFrom $regionFrom;
  859.         return $this;
  860.     }
  861.     public function getNumberFOP(): ?string
  862.     {
  863.         return $this->numberFOP;
  864.     }
  865.     public function setNumberFOP(?string $numberFOP): static
  866.     {
  867.         $this->numberFOP $numberFOP;
  868.         return $this;
  869.     }
  870.     public function getCodeEDRPOU(): ?string
  871.     {
  872.         return $this->codeEDRPOU;
  873.     }
  874.     public function setCodeEDRPOU(?string $codeEDRPOU): static
  875.     {
  876.         $this->codeEDRPOU $codeEDRPOU;
  877.         return $this;
  878.     }
  879.     public function getGrantSupport(): ?string
  880.     {
  881.         return $this->grantSupport;
  882.     }
  883.     public function setGrantSupport(?string $grantSupport): static
  884.     {
  885.         $this->grantSupport $grantSupport;
  886.         return $this;
  887.     }
  888.     public function getCompanyName(): ?string
  889.     {
  890.         return $this->companyName;
  891.     }
  892.     public function setCompanyName(?string $companyName): static
  893.     {
  894.         $this->companyName $companyName;
  895.         return $this;
  896.     }
  897.     public function getUserType(): ?string
  898.     {
  899.         return $this->userType;
  900.     }
  901.     public function setUserType(string $userType): static
  902.     {
  903.         $this->userType $userType;
  904.         return $this;
  905.     }
  906.     public function isIsSentForPYSupport(): ?bool
  907.     {
  908.         return $this->isSentForPYSupport;
  909.     }
  910.     public function setIsSentForPYSupport(?bool $isSentForPYSupport): static
  911.     {
  912.         $this->isSentForPYSupport $isSentForPYSupport;
  913.         return $this;
  914.     }
  915.     public function getHash(): ?string
  916.     {
  917.         return $this->hash;
  918.     }
  919.     public function setHash(?string $hash): static
  920.     {
  921.         $this->hash $hash;
  922.         return $this;
  923.     }
  924.     public function isEmailVerified(): ?bool
  925.     {
  926.         return $this->emailVerified;
  927.     }
  928.     public function setEmailVerified(?bool $emailVerified): static
  929.     {
  930.         $this->emailVerified $emailVerified;
  931.         return $this;
  932.     }
  933.     public function getHashDate(): ?\DateTimeInterface
  934.     {
  935.         return $this->hashDate;
  936.     }
  937.     public function setHashDate(?\DateTimeInterface $hashDate): static
  938.     {
  939.         $this->hashDate $hashDate;
  940.         return $this;
  941.     }
  942. }