src/Entity/Generic/User.php line 36

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Generic;
  3. use App\Entity\BaseEntity;
  4. use App\Entity\Campaign;
  5. use App\Entity\Domains\Domain;
  6. use App\Entity\Idea;
  7. use App\Entity\Server\Hetzner\Ip;
  8. use App\Entity\Server\Hetzner\Server;
  9. use App\Entity\Server\Ticket\Ticket;
  10. use App\Entity\Server\Ticket\TicketMessage;
  11. use App\Entity\SubTransactions\ArzDigital;
  12. use App\Entity\SubTransactions\DonateKon;
  13. use App\Entity\SubTransactions\StreamMasters;
  14. use App\Entity\Telegram\AgentPublicBot\Bot;
  15. use App\Entity\Transaction;
  16. use App\Entity\VPN\Service\Service;
  17. use App\Repository\Generic\UserRepository;
  18. use DateTimeInterface;
  19. use Doctrine\Common\Collections\ArrayCollection;
  20. use Doctrine\Common\Collections\Collection;
  21. use Doctrine\DBAL\Types\Types;
  22. use Doctrine\ORM\Mapping as ORM;
  23. use JetBrains\PhpStorm\Pure;
  24. use Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator;
  25. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  26. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  27. use Symfony\Component\Security\Core\User\UserInterface;
  28. use Symfony\Component\Validator\Constraints as Assert;
  29. #[ORM\Entity(repositoryClassUserRepository::class)]
  30. #[ORM\Table(name'`user`')]
  31. #[UniqueEntity(fields: ['email'], message'این پست الکترونیک از قبل موجود می باشد')]
  32. #[UniqueEntity(fields: ['mobile'], message'این شماره موبایل از قبل موجود می باشد')]
  33. class User extends BaseEntity implements UserInterfacePasswordAuthenticatedUserInterface
  34. {
  35.     #[ORM\Id]
  36.     #[ORM\Column(type'guid'uniquetrue)]
  37.     #[ORM\GeneratedValue(strategy'CUSTOM')]
  38.     #[ORM\CustomIdGenerator(class: UuidGenerator::class)]
  39.     private $id;
  40.     #[ORM\Column(type'string'length180uniquetrue)]
  41.     private $email;
  42.     #[ORM\Column(type'json')]
  43.     private $roles = [];
  44.     #[ORM\Column(type'string')]
  45.     private $password;
  46.     #[ORM\Column(type'boolean')]
  47.     private $isVerified false;
  48.     #[ORM\Column(type'string'length255nullabletrue)]
  49.     private $firstName;
  50.     #[ORM\Column(type'string'length255nullabletrue)]
  51.     private $lastName;
  52.     #[ORM\Column(type'json')]
  53.     private $access = [];
  54.     #[ORM\Column(type'string'length255nullabletrue)]
  55.     private $image;
  56.     #[ORM\Column(type'bigint')]
  57.     private $wallet 0;
  58.     #[ORM\Column(type'string'length255nullabletrue)]
  59.     private ?string $mobile;
  60.     #[ORM\OneToMany(mappedBy'owner'targetEntityTransaction::class)]
  61.     private Collection $transactions;
  62.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  63.     private ?DateTimeInterface $lastLogin null;
  64.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'users')]
  65.     private ?self $presenter null;
  66.     #[ORM\OneToMany(mappedBy'presenter'targetEntityself::class)]
  67.     private Collection $users;
  68.     #[ORM\Column(nullabletrue)]
  69.     private ?int $uniquePresenterCode null;
  70.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  71.     private ?\DateTimeInterface $lastBuy null;
  72.     #[ORM\Column]
  73.     private ?int $subUserCount null;
  74.     /**
  75.      * @var Collection<int, Service>
  76.      */
  77.     #[ORM\OneToMany(targetEntityService::class, mappedBy'owner')]
  78.     private Collection $services;
  79.     #[ORM\Column(nullabletrue)]
  80.     #[Assert\Range(
  81.         notInRangeMessage'
  82.         درصد سود باید بین 
  83.         {{ min }}
  84.         و 
  85.         {{ max }}
  86.         باشد',
  87.         min0,
  88.         max1000,
  89.     )]
  90.     private ?int $interestRate null;
  91.     #[ORM\Column(length255nullabletrue)]
  92.     private ?string $telegramChannel null;
  93.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  94.     private ?string $customerText null;
  95.     #[ORM\Column(nullabletrue)]
  96.     private ?int $thisMonthCharge null;
  97.     #[ORM\OneToMany(mappedBy'author'targetEntityTransaction::class)]
  98.     private Collection $madeTransactions;
  99.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'advertisedUsers')]
  100.     private ?self $advertiser null;
  101.     #[ORM\OneToMany(mappedBy'advertiser'targetEntityself::class)]
  102.     private Collection $advertisedUsers;
  103.     #[ORM\Column(length255nullabletrue)]
  104.     private ?string $userTrace null;
  105.     #[ORM\ManyToOne(inversedBy'users')]
  106.     private ?Campaign $campaign null;
  107.     #[ORM\OneToMany(mappedBy'owner'targetEntityDomain::class)]
  108.     private Collection $domains;
  109.     #[ORM\Column(nullabletrue)]
  110.     private ?bool $isTelegramContact null;
  111.     #[ORM\Column(nullabletrue)]
  112.     private ?bool $isTelegramContactChecked null;
  113.     #[ORM\OneToMany(mappedBy'owner'targetEntityBot::class)]
  114.     private Collection $bots;
  115.     #[ORM\OneToMany(mappedBy'author'targetEntityIdea::class)]
  116.     private Collection $ideas;
  117.     #[ORM\Column(length255nullabletrue)]
  118.     private ?string $cardNumberToCharge null;
  119.     #[ORM\Column(typeTypes::BIGINTnullabletrue)]
  120.     private ?string $advertiserMonthlyIncome null;
  121.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  122.     private ?string $connectedTelegramUserId null;
  123.     #[ORM\OneToMany(mappedBy'panelOwner'targetEntityArzDigital::class)]
  124.     private Collection $arzDigitals;
  125.     #[ORM\Column(nullabletrue)]
  126.     private ?int $VpnServicesCount null;
  127.     #[ORM\Column(typeTypes::BIGINTnullabletrue)]
  128.     private ?string $giftWallet null;
  129.     #[ORM\OneToMany(mappedBy'owner'targetEntityIp::class)]
  130.     private Collection $hetznerIps;
  131.     #[ORM\OneToMany(mappedBy'owner'targetEntityServer::class)]
  132.     private Collection $hetznerServers;
  133.     #[ORM\OneToMany(mappedBy'owner'targetEntityStreamMasters::class)]
  134.     private Collection $streamMasters;
  135.     #[ORM\OneToMany(mappedBy'owner'targetEntityDonateKon::class)]
  136.     private Collection $donateKons;
  137.     #[ORM\OneToMany(mappedBy'creator'targetEntityTicket::class)]
  138.     private Collection $tickets;
  139.     #[ORM\OneToMany(mappedBy'author'targetEntityTicketMessage::class)]
  140.     private Collection $ticketMessages;
  141.     public function __construct()
  142.     {
  143.         parent::__construct();
  144.         $this->setIsVerified(false);
  145.         $this->setInterestRate(100);
  146.         $this->setSubUserCount(0);
  147.         $this->transactions = new ArrayCollection();
  148.         $this->users = new ArrayCollection();
  149.         $this->madeTransactions = new ArrayCollection();
  150.         $this->advertisedUsers = new ArrayCollection();
  151.         $this->domains = new ArrayCollection();
  152.         $this->setIsTelegramContactChecked(0);
  153.         $this->bots = new ArrayCollection();
  154.         $this->ideas = new ArrayCollection();
  155.         $this->setCardNumberToCharge('');
  156.         $this->arzDigitals = new ArrayCollection();
  157.         $this->streamMasters = new ArrayCollection();
  158.         $this->donateKons = new ArrayCollection();
  159.         $this->tickets = new ArrayCollection();
  160.         $this->ticketMessages = new ArrayCollection();
  161.     }
  162.     #[Pure] public function __toString(): string
  163.     {
  164.         if ($this->getFirstName() && $this->getLastName()) {
  165.             return $this->getFirstName() . ' ' $this->getLastName();
  166.         }
  167.         return $this->getEmail();
  168.     }
  169.     public function getFirstName(): ?string
  170.     {
  171.         return $this->firstName;
  172.     }
  173.     public function setFirstName(?string $firstName): self
  174.     {
  175.         $this->firstName $firstName;
  176.         return $this;
  177.     }
  178.     public function getLastName(): ?string
  179.     {
  180.         return $this->lastName;
  181.     }
  182.     public function setLastName(?string $lastName): self
  183.     {
  184.         $this->lastName $lastName;
  185.         return $this;
  186.     }
  187.     public function getEmail(): ?string
  188.     {
  189.         return $this->email;
  190.     }
  191.     public function setEmail(string $email): self
  192.     {
  193.         $this->email $email;
  194.         return $this;
  195.     }
  196.     public function hasRole($role): bool
  197.     {
  198.         return in_array($role$this->getRoles());
  199.     }
  200.     /**
  201.      * @see UserInterface
  202.      */
  203.     public function getRoles(): array
  204.     {
  205.         $roles $this->roles;
  206.         // guarantee every user at least has ROLE_USER
  207.         $roles[] = 'ROLE_USER';
  208.         return array_unique($roles);
  209.     }
  210.     public function setRoles(array $roles): self
  211.     {
  212.         $this->roles $roles;
  213.         return $this;
  214.     }
  215.     public function getId(): ?string
  216.     {
  217.         return $this->id;
  218.     }
  219.     #[Pure] public function hasAccess($access): bool
  220.     {
  221.         return in_array($access$this->getAccess());
  222.     }
  223.     public function getAccess(): ?array
  224.     {
  225.         if ($this->access) {
  226.             return $this->access;
  227.         }
  228.         return [];
  229.     }
  230.     public function setAccess(array $access): self
  231.     {
  232.         $this->access $access;
  233.         return $this;
  234.     }
  235.     /**
  236.      * A visual identifier that represents this user.
  237.      *
  238.      * @see UserInterface
  239.      */
  240.     public function getUserIdentifier(): string
  241.     {
  242.         return (string)$this->email;
  243.     }
  244.     /**
  245.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  246.      */
  247.     public function getUsername(): string
  248.     {
  249.         return (string)$this->email;
  250.     }
  251.     /**
  252.      * @see PasswordAuthenticatedUserInterface
  253.      */
  254.     public function getPassword(): string
  255.     {
  256.         return $this->password;
  257.     }
  258.     public function setPassword(string $password): self
  259.     {
  260.         $this->password $password;
  261.         return $this;
  262.     }
  263.     /**
  264.      * Returning a salt is only needed, if you are not using a modern
  265.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  266.      *
  267.      * @see UserInterface
  268.      */
  269.     public function getSalt(): ?string
  270.     {
  271.         return null;
  272.     }
  273.     /**
  274.      * @see UserInterface
  275.      */
  276.     public function eraseCredentials()
  277.     {
  278.         // If you store any temporary, sensitive data on the user, clear it here
  279.         // $this->plainPassword = null;
  280.     }
  281.     public function getImage(): ?string
  282.     {
  283.         return $this->image;
  284.     }
  285.     public function setImage(?string $image): self
  286.     {
  287.         $this->image $image;
  288.         return $this;
  289.     }
  290.     public function getWallet(): ?string
  291.     {
  292.         return $this->wallet;
  293.     }
  294.     public function setWallet(string $wallet): self
  295.     {
  296.         $this->wallet $wallet;
  297.         return $this;
  298.     }
  299.     public function getMobile(): ?string
  300.     {
  301.         return $this->mobile;
  302.     }
  303.     public function setMobile$mobile): self
  304.     {
  305.         $this->mobile $mobile;
  306.         return $this;
  307.     }
  308.     public function getMobileColoredItem(): ?string
  309.     {
  310.         if ($this->getMobile()){
  311.             return $this->getMobile();
  312.         }else{
  313.             return  'ندارد';
  314.         }
  315.     }
  316.     /**
  317.      * @return Collection<int, Transaction>
  318.      */
  319.     public function getTransactions(): Collection
  320.     {
  321.         return $this->transactions;
  322.     }
  323.     public function addTransaction(Transaction $transaction): self
  324.     {
  325.         if (!$this->transactions->contains($transaction)) {
  326.             $this->transactions->add($transaction);
  327.             $transaction->setOwner($this);
  328.         }
  329.         return $this;
  330.     }
  331.     public function removeTransaction(Transaction $transaction): self
  332.     {
  333.         if ($this->transactions->removeElement($transaction)) {
  334.             // set the owning side to null (unless already changed)
  335.             if ($transaction->getOwner() === $this) {
  336.                 $transaction->setOwner(null);
  337.             }
  338.         }
  339.         return $this;
  340.     }
  341.     public function getLastLogin(): ?DateTimeInterface
  342.     {
  343.         return $this->lastLogin;
  344.     }
  345.     public function setLastLogin(?DateTimeInterface $lastLogin): self
  346.     {
  347.         $this->lastLogin $lastLogin;
  348.         return $this;
  349.     }
  350.     /**
  351.      * @return Collection<int, self>
  352.      */
  353.     public function getUsers(): Collection
  354.     {
  355.         return $this->users;
  356.     }
  357.     public function addUser(self $user): self
  358.     {
  359.         if (!$this->users->contains($user)) {
  360.             $this->users->add($user);
  361.             $user->setPresenter($this);
  362.         }
  363.         return $this;
  364.     }
  365.     public function removeUser(self $user): self
  366.     {
  367.         if ($this->users->removeElement($user)) {
  368.             // set the owning side to null (unless already changed)
  369.             if ($user->getPresenter() === $this) {
  370.                 $user->setPresenter(null);
  371.             }
  372.         }
  373.         return $this;
  374.     }
  375.     public function getPresenter(): ?self
  376.     {
  377.         return $this->presenter;
  378.     }
  379.     public function setPresenter(?self $presenter): self
  380.     {
  381.         $this->presenter $presenter;
  382.         return $this;
  383.     }
  384.     public function getUniquePresenterCode(): ?int
  385.     {
  386.         return $this->uniquePresenterCode;
  387.     }
  388.     public function setUniquePresenterCode(?int $uniquePresenterCode): self
  389.     {
  390.         $this->uniquePresenterCode $uniquePresenterCode;
  391.         return $this;
  392.     }
  393.     public function getLastBuy(): ?\DateTimeInterface
  394.     {
  395.         return $this->lastBuy;
  396.     }
  397.     public function setLastBuy(?\DateTimeInterface $lastBuy): self
  398.     {
  399.         $this->lastBuy $lastBuy;
  400.         return $this;
  401.     }
  402.     public function getSubUserCount(): ?int
  403.     {
  404.         return $this->subUserCount;
  405.     }
  406.     public function setSubUserCount(int $subUserCount): self
  407.     {
  408.         $this->subUserCount $subUserCount;
  409.         return $this;
  410.     }
  411.     public function getInterestRate(): ?int
  412.     {
  413.         return $this->interestRate;
  414.     }
  415.     public function setInterestRate(?int $interestRate): self
  416.     {
  417.         $this->interestRate $interestRate;
  418.         return $this;
  419.     }
  420.     public function getTelegramChannel(): ?string
  421.     {
  422.         return $this->telegramChannel;
  423.     }
  424.     public function setTelegramChannel(?string $telegramChannel): self
  425.     {
  426.         $this->telegramChannel $telegramChannel;
  427.         return $this;
  428.     }
  429.     public function getCustomerText(): ?string
  430.     {
  431.         return $this->customerText;
  432.     }
  433.     public function setCustomerText(?string $customerText): self
  434.     {
  435.         $this->customerText $customerText;
  436.         return $this;
  437.     }
  438.     public function getThisMonthCharge(): ?int
  439.     {
  440.         return $this->thisMonthCharge;
  441.     }
  442.     public function setThisMonthCharge(?int $thisMonthCharge): self
  443.     {
  444.         $this->thisMonthCharge $thisMonthCharge;
  445.         return $this;
  446.     }
  447.     /**
  448.      * @return Collection<int, Transaction>
  449.      */
  450.     public function getMadeTransactions(): Collection
  451.     {
  452.         return $this->madeTransactions;
  453.     }
  454.     public function addMadeTransaction(Transaction $madeTransaction): self
  455.     {
  456.         if (!$this->madeTransactions->contains($madeTransaction)) {
  457.             $this->madeTransactions->add($madeTransaction);
  458.             $madeTransaction->setAuthor($this);
  459.         }
  460.         return $this;
  461.     }
  462.     public function removeMadeTransaction(Transaction $madeTransaction): self
  463.     {
  464.         if ($this->madeTransactions->removeElement($madeTransaction)) {
  465.             // set the owning side to null (unless already changed)
  466.             if ($madeTransaction->getAuthor() === $this) {
  467.                 $madeTransaction->setAuthor(null);
  468.             }
  469.         }
  470.         return $this;
  471.     }
  472.     public function getAdvertiser(): ?self
  473.     {
  474.         return $this->advertiser;
  475.     }
  476.     public function setAdvertiser(?self $advertiser): self
  477.     {
  478.         $this->advertiser $advertiser;
  479.         return $this;
  480.     }
  481.     /**
  482.      * @return Collection<int, self>
  483.      */
  484.     public function getAdvertisedUsers(): Collection
  485.     {
  486.         return $this->advertisedUsers;
  487.     }
  488.     public function addAdvertisedUser(self $advertisedUser): self
  489.     {
  490.         if (!$this->advertisedUsers->contains($advertisedUser)) {
  491.             $this->advertisedUsers->add($advertisedUser);
  492.             $advertisedUser->setAdvertiser($this);
  493.         }
  494.         return $this;
  495.     }
  496.     public function removeAdvertisedUser(self $advertisedUser): self
  497.     {
  498.         if ($this->advertisedUsers->removeElement($advertisedUser)) {
  499.             // set the owning side to null (unless already changed)
  500.             if ($advertisedUser->getAdvertiser() === $this) {
  501.                 $advertisedUser->setAdvertiser(null);
  502.             }
  503.         }
  504.         return $this;
  505.     }
  506.     /**
  507.      * @return array|null
  508.      */
  509.     public function getUserTrace(): ?array
  510.     {
  511.         return json_decode($this->userTrace true);
  512.     }
  513.     /**
  514.      * @param array|null $userTrace
  515.      */
  516.     public function setUserTrace(?array $userTrace): void
  517.     {
  518.         $this->userTrace json_encode($userTrace);
  519.     }
  520.     public function getCampaign(): ?Campaign
  521.     {
  522.         return $this->campaign;
  523.     }
  524.     public function setCampaign(?Campaign $campaign): static
  525.     {
  526.         $this->campaign $campaign;
  527.         return $this;
  528.     }
  529.     /**
  530.      * @return Collection<int, Domain>
  531.      */
  532.     public function getDomains(): Collection
  533.     {
  534.         return $this->domains;
  535.     }
  536.     public function addDomain(Domain $domain): static
  537.     {
  538.         if (!$this->domains->contains($domain)) {
  539.             $this->domains->add($domain);
  540.             $domain->setOwner($this);
  541.         }
  542.         return $this;
  543.     }
  544.     public function removeDomain(Domain $domain): static
  545.     {
  546.         if ($this->domains->removeElement($domain)) {
  547.             // set the owning side to null (unless already changed)
  548.             if ($domain->getOwner() === $this) {
  549.                 $domain->setOwner(null);
  550.             }
  551.         }
  552.         return $this;
  553.     }
  554.     public function isVerified(): bool
  555.     {
  556.         return $this->isVerified;
  557.     }
  558.     public function setIsVerified(bool $isVerified): void
  559.     {
  560.         $this->isVerified $isVerified;
  561.     }
  562.     public function isIsTelegramContact(): ?bool
  563.     {
  564.         return $this->isTelegramContact;
  565.     }
  566.     public function setIsTelegramContact(?bool $isTelegramContact): static
  567.     {
  568.         $this->isTelegramContact $isTelegramContact;
  569.         return $this;
  570.     }
  571.     public function isIsTelegramContactChecked(): ?bool
  572.     {
  573.         return $this->isTelegramContactChecked;
  574.     }
  575.     public function setIsTelegramContactChecked(?bool $isTelegramContactChecked): static
  576.     {
  577.         $this->isTelegramContactChecked $isTelegramContactChecked;
  578.         return $this;
  579.     }
  580.     /**
  581.      * @return Collection<int, Bot>
  582.      */
  583.     public function getBots(): Collection
  584.     {
  585.         return $this->bots;
  586.     }
  587.     public function addBot(Bot $bot): static
  588.     {
  589.         if (!$this->bots->contains($bot)) {
  590.             $this->bots->add($bot);
  591.             $bot->setOwner($this);
  592.         }
  593.         return $this;
  594.     }
  595.     public function removeBot(Bot $bot): static
  596.     {
  597.         if ($this->bots->removeElement($bot)) {
  598.             // set the owning side to null (unless already changed)
  599.             if ($bot->getOwner() === $this) {
  600.                 $bot->setOwner(null);
  601.             }
  602.         }
  603.         return $this;
  604.     }
  605.     /**
  606.      * @return Collection<int, Idea>
  607.      */
  608.     public function getIdeas(): Collection
  609.     {
  610.         return $this->ideas;
  611.     }
  612.     public function addIdea(Idea $idea): static
  613.     {
  614.         if (!$this->ideas->contains($idea)) {
  615.             $this->ideas->add($idea);
  616.             $idea->setAuthor($this);
  617.         }
  618.         return $this;
  619.     }
  620.     public function removeIdea(Idea $idea): static
  621.     {
  622.         if ($this->ideas->removeElement($idea)) {
  623.             // set the owning side to null (unless already changed)
  624.             if ($idea->getAuthor() === $this) {
  625.                 $idea->setAuthor(null);
  626.             }
  627.         }
  628.         return $this;
  629.     }
  630.     public function getCardNumberToCharge(): ?string
  631.     {
  632.         return $this->cardNumberToCharge;
  633.     }
  634.     public function setCardNumberToCharge(?string $cardNumberToCharge): static
  635.     {
  636.         $this->cardNumberToCharge $cardNumberToCharge;
  637.         return $this;
  638.     }
  639.     public function getTheme(): ?string
  640.     {
  641. //        if ($this->hasRole('ROLE_ADMIN')){
  642.             return 'neon';
  643. //        }
  644. //        return 'default';
  645. //        return $this->theme?:'default';
  646.     }
  647.     public function setTheme(?string $theme): static
  648.     {
  649.         $this->theme $theme;
  650.         return $this;
  651.     }
  652.     public function getAdvertiserMonthlyIncome(): ?string
  653.     {
  654.         return $this->advertiserMonthlyIncome;
  655.     }
  656.     public function setAdvertiserMonthlyIncome(?string $advertiserMonthlyIncome): static
  657.     {
  658.         $this->advertiserMonthlyIncome $advertiserMonthlyIncome;
  659.         return $this;
  660.     }
  661.     public function getConnectedTelegramUserId(): ?array
  662.     {
  663.         return json_decode($this->connectedTelegramUserId true);
  664.     }
  665.     public function setConnectedTelegramUserId(?array $connectedTelegramUserId): static
  666.     {
  667.         $this->connectedTelegramUserId json_encode($connectedTelegramUserId);
  668.         return $this;
  669.     }
  670.     /**
  671.      * @return Collection<int, ArzDigital>
  672.      */
  673.     public function getArzDigitals(): Collection
  674.     {
  675.         return $this->arzDigitals;
  676.     }
  677.     public function addArzDigital(ArzDigital $arzDigital): static
  678.     {
  679.         if (!$this->arzDigitals->contains($arzDigital)) {
  680.             $this->arzDigitals->add($arzDigital);
  681.             $arzDigital->setPanelOwner($this);
  682.         }
  683.         return $this;
  684.     }
  685.     public function removeArzDigital(ArzDigital $arzDigital): static
  686.     {
  687.         if ($this->arzDigitals->removeElement($arzDigital)) {
  688.             // set the owning side to null (unless already changed)
  689.             if ($arzDigital->getPanelOwner() === $this) {
  690.                 $arzDigital->setPanelOwner(null);
  691.             }
  692.         }
  693.         return $this;
  694.     }
  695.     public function getVpnServicesCount(): ?int
  696.     {
  697.         return $this->VpnServicesCount;
  698.     }
  699.     public function setVpnServicesCount(?int $VpnServicesCount): static
  700.     {
  701.         $this->VpnServicesCount $VpnServicesCount;
  702.         return $this;
  703.     }
  704.     public function getGiftWallet(): ?string
  705.     {
  706.         return $this->giftWallet;
  707.     }
  708.     public function setGiftWallet(?string $giftWallet): static
  709.     {
  710.         $this->giftWallet $giftWallet;
  711.         return $this;
  712.     }
  713.     /**
  714.      * @return Collection<int, Ip>
  715.      */
  716.     public function getHetznerIps(): Collection
  717.     {
  718.         return $this->hetznerIps;
  719.     }
  720.     public function addHetznerIp(Ip $hetznerIp): static
  721.     {
  722.         if (!$this->hetznerIps->contains($hetznerIp)) {
  723.             $this->hetznerIps->add($hetznerIp);
  724.             $hetznerIp->setOwner($this);
  725.         }
  726.         return $this;
  727.     }
  728.     public function removeHetznerIp(Ip $hetznerIp): static
  729.     {
  730.         if ($this->hetznerIps->removeElement($hetznerIp)) {
  731.             // set the owning side to null (unless already changed)
  732.             if ($hetznerIp->getOwner() === $this) {
  733.                 $hetznerIp->setOwner(null);
  734.             }
  735.         }
  736.         return $this;
  737.     }
  738.     /**
  739.      * @return Collection<int, Server>
  740.      */
  741.     public function getHetznerServers(): Collection
  742.     {
  743.         return $this->hetznerServers;
  744.     }
  745.     public function addHetznerServer(Server $hetznerServer): static
  746.     {
  747.         if (!$this->hetznerServers->contains($hetznerServer)) {
  748.             $this->hetznerServers->add($hetznerServer);
  749.             $hetznerServer->setOwner($this);
  750.         }
  751.         return $this;
  752.     }
  753.     public function removeHetznerServer(Server $hetznerServer): static
  754.     {
  755.         if ($this->hetznerServers->removeElement($hetznerServer)) {
  756.             // set the owning side to null (unless already changed)
  757.             if ($hetznerServer->getOwner() === $this) {
  758.                 $hetznerServer->setOwner(null);
  759.             }
  760.         }
  761.         return $this;
  762.     }
  763.     /**
  764.      * @return Collection<int, StreamMasters>
  765.      */
  766.     public function getStreamMasters(): Collection
  767.     {
  768.         return $this->streamMasters;
  769.     }
  770.     public function addStreamMaster(StreamMasters $streamMaster): static
  771.     {
  772.         if (!$this->streamMasters->contains($streamMaster)) {
  773.             $this->streamMasters->add($streamMaster);
  774.             $streamMaster->setOwner($this);
  775.         }
  776.         return $this;
  777.     }
  778.     public function removeStreamMaster(StreamMasters $streamMaster): static
  779.     {
  780.         if ($this->streamMasters->removeElement($streamMaster)) {
  781.             // set the owning side to null (unless already changed)
  782.             if ($streamMaster->getOwner() === $this) {
  783.                 $streamMaster->setOwner(null);
  784.             }
  785.         }
  786.         return $this;
  787.     }
  788.     /**
  789.      * @return Collection<int, DonateKon>
  790.      */
  791.     public function getDonateKons(): Collection
  792.     {
  793.         return $this->donateKons;
  794.     }
  795.     public function addDonateKon(DonateKon $donateKon): static
  796.     {
  797.         if (!$this->donateKons->contains($donateKon)) {
  798.             $this->donateKons->add($donateKon);
  799.             $donateKon->setOwner($this);
  800.         }
  801.         return $this;
  802.     }
  803.     public function removeDonateKon(DonateKon $donateKon): static
  804.     {
  805.         if ($this->donateKons->removeElement($donateKon)) {
  806.             // set the owning side to null (unless already changed)
  807.             if ($donateKon->getOwner() === $this) {
  808.                 $donateKon->setOwner(null);
  809.             }
  810.         }
  811.         return $this;
  812.     }
  813.     /**
  814.      * @return Collection<int, Ticket>
  815.      */
  816.     public function getTickets(): Collection
  817.     {
  818.         return $this->tickets;
  819.     }
  820.     public function addTicket(Ticket $ticket): static
  821.     {
  822.         if (!$this->tickets->contains($ticket)) {
  823.             $this->tickets->add($ticket);
  824.             $ticket->setCreator($this);
  825.         }
  826.         return $this;
  827.     }
  828.     public function removeTicket(Ticket $ticket): static
  829.     {
  830.         if ($this->tickets->removeElement($ticket)) {
  831.             // set the owning side to null (unless already changed)
  832.             if ($ticket->getCreator() === $this) {
  833.                 $ticket->setCreator(null);
  834.             }
  835.         }
  836.         return $this;
  837.     }
  838.     /**
  839.      * @return Collection<int, TicketMessage>
  840.      */
  841.     public function getTicketMessages(): Collection
  842.     {
  843.         return $this->ticketMessages;
  844.     }
  845.     public function addTicketMessage(TicketMessage $ticketMessage): static
  846.     {
  847.         if (!$this->ticketMessages->contains($ticketMessage)) {
  848.             $this->ticketMessages->add($ticketMessage);
  849.             $ticketMessage->setAuthor($this);
  850.         }
  851.         return $this;
  852.     }
  853.     public function removeTicketMessage(TicketMessage $ticketMessage): static
  854.     {
  855.         if ($this->ticketMessages->removeElement($ticketMessage)) {
  856.             // set the owning side to null (unless already changed)
  857.             if ($ticketMessage->getAuthor() === $this) {
  858.                 $ticketMessage->setAuthor(null);
  859.             }
  860.         }
  861.         return $this;
  862.     }
  863. }