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\SAAS\Server\Hetzner\Ip;
  8. use App\Entity\SAAS\Server\Hetzner\Server;
  9. use App\Entity\SAAS\Server\Ticket\Ticket;
  10. use App\Entity\SAAS\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.     #[ORM\OneToMany(mappedBy'owner'targetEntity\App\Entity\SAAS\Domain\Domain::class)]
  142.     private Collection $boughtDomains;
  143.     public function __construct()
  144.     {
  145.         parent::__construct();
  146.         $this->setIsVerified(false);
  147.         $this->setInterestRate(100);
  148.         $this->setSubUserCount(0);
  149.         $this->transactions = new ArrayCollection();
  150.         $this->users = new ArrayCollection();
  151.         $this->madeTransactions = new ArrayCollection();
  152.         $this->advertisedUsers = new ArrayCollection();
  153.         $this->domains = new ArrayCollection();
  154.         $this->setIsTelegramContactChecked(0);
  155.         $this->bots = new ArrayCollection();
  156.         $this->ideas = new ArrayCollection();
  157.         $this->setCardNumberToCharge('');
  158.         $this->arzDigitals = new ArrayCollection();
  159.         $this->streamMasters = new ArrayCollection();
  160.         $this->donateKons = new ArrayCollection();
  161.         $this->tickets = new ArrayCollection();
  162.         $this->ticketMessages = new ArrayCollection();
  163.         $this->boughtDomains = new ArrayCollection();
  164.     }
  165.     #[Pure] public function __toString(): string
  166.     {
  167.         if ($this->getFirstName() && $this->getLastName()) {
  168.             return $this->getFirstName() . ' ' $this->getLastName();
  169.         }
  170.         return $this->getEmail();
  171.     }
  172.     public function getFirstName(): ?string
  173.     {
  174.         return $this->firstName;
  175.     }
  176.     public function setFirstName(?string $firstName): self
  177.     {
  178.         $this->firstName $firstName;
  179.         return $this;
  180.     }
  181.     public function getLastName(): ?string
  182.     {
  183.         return $this->lastName;
  184.     }
  185.     public function setLastName(?string $lastName): self
  186.     {
  187.         $this->lastName $lastName;
  188.         return $this;
  189.     }
  190.     public function getEmail(): ?string
  191.     {
  192.         return $this->email;
  193.     }
  194.     public function setEmail(string $email): self
  195.     {
  196.         $this->email $email;
  197.         return $this;
  198.     }
  199.     public function hasRole($role): bool
  200.     {
  201.         return in_array($role$this->getRoles());
  202.     }
  203.     /**
  204.      * @see UserInterface
  205.      */
  206.     public function getRoles(): array
  207.     {
  208.         $roles $this->roles;
  209.         // guarantee every user at least has ROLE_USER
  210.         $roles[] = 'ROLE_USER';
  211.         return array_unique($roles);
  212.     }
  213.     public function setRoles(array $roles): self
  214.     {
  215.         $this->roles $roles;
  216.         return $this;
  217.     }
  218.     public function getId(): ?string
  219.     {
  220.         return $this->id;
  221.     }
  222.     #[Pure] public function hasAccess($access): bool
  223.     {
  224.         return in_array($access$this->getAccess());
  225.     }
  226.     public function getAccess(): ?array
  227.     {
  228.         if ($this->access) {
  229.             return $this->access;
  230.         }
  231.         return [];
  232.     }
  233.     public function setAccess(array $access): self
  234.     {
  235.         $this->access $access;
  236.         return $this;
  237.     }
  238.     /**
  239.      * A visual identifier that represents this user.
  240.      *
  241.      * @see UserInterface
  242.      */
  243.     public function getUserIdentifier(): string
  244.     {
  245.         return (string)$this->email;
  246.     }
  247.     /**
  248.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  249.      */
  250.     public function getUsername(): string
  251.     {
  252.         return (string)$this->email;
  253.     }
  254.     /**
  255.      * @see PasswordAuthenticatedUserInterface
  256.      */
  257.     public function getPassword(): string
  258.     {
  259.         return $this->password;
  260.     }
  261.     public function setPassword(string $password): self
  262.     {
  263.         $this->password $password;
  264.         return $this;
  265.     }
  266.     /**
  267.      * Returning a salt is only needed, if you are not using a modern
  268.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  269.      *
  270.      * @see UserInterface
  271.      */
  272.     public function getSalt(): ?string
  273.     {
  274.         return null;
  275.     }
  276.     /**
  277.      * @see UserInterface
  278.      */
  279.     public function eraseCredentials()
  280.     {
  281.         // If you store any temporary, sensitive data on the user, clear it here
  282.         // $this->plainPassword = null;
  283.     }
  284.     public function getImage(): ?string
  285.     {
  286.         return $this->image;
  287.     }
  288.     public function setImage(?string $image): self
  289.     {
  290.         $this->image $image;
  291.         return $this;
  292.     }
  293.     public function getWallet(): ?string
  294.     {
  295.         return $this->wallet;
  296.     }
  297.     public function setWallet(string $wallet): self
  298.     {
  299.         $this->wallet $wallet;
  300.         return $this;
  301.     }
  302.     public function getMobile(): ?string
  303.     {
  304.         return $this->mobile;
  305.     }
  306.     public function setMobile$mobile): self
  307.     {
  308.         $this->mobile $mobile;
  309.         return $this;
  310.     }
  311.     public function getMobileColoredItem(): ?string
  312.     {
  313.         if ($this->getMobile()){
  314.             return $this->getMobile();
  315.         }else{
  316.             return  'ندارد';
  317.         }
  318.     }
  319.     /**
  320.      * @return Collection<int, Transaction>
  321.      */
  322.     public function getTransactions(): Collection
  323.     {
  324.         return $this->transactions;
  325.     }
  326.     public function addTransaction(Transaction $transaction): self
  327.     {
  328.         if (!$this->transactions->contains($transaction)) {
  329.             $this->transactions->add($transaction);
  330.             $transaction->setOwner($this);
  331.         }
  332.         return $this;
  333.     }
  334.     public function removeTransaction(Transaction $transaction): self
  335.     {
  336.         if ($this->transactions->removeElement($transaction)) {
  337.             // set the owning side to null (unless already changed)
  338.             if ($transaction->getOwner() === $this) {
  339.                 $transaction->setOwner(null);
  340.             }
  341.         }
  342.         return $this;
  343.     }
  344.     public function getLastLogin(): ?DateTimeInterface
  345.     {
  346.         return $this->lastLogin;
  347.     }
  348.     public function setLastLogin(?DateTimeInterface $lastLogin): self
  349.     {
  350.         $this->lastLogin $lastLogin;
  351.         return $this;
  352.     }
  353.     /**
  354.      * @return Collection<int, self>
  355.      */
  356.     public function getUsers(): Collection
  357.     {
  358.         return $this->users;
  359.     }
  360.     public function addUser(self $user): self
  361.     {
  362.         if (!$this->users->contains($user)) {
  363.             $this->users->add($user);
  364.             $user->setPresenter($this);
  365.         }
  366.         return $this;
  367.     }
  368.     public function removeUser(self $user): self
  369.     {
  370.         if ($this->users->removeElement($user)) {
  371.             // set the owning side to null (unless already changed)
  372.             if ($user->getPresenter() === $this) {
  373.                 $user->setPresenter(null);
  374.             }
  375.         }
  376.         return $this;
  377.     }
  378.     public function getPresenter(): ?self
  379.     {
  380.         return $this->presenter;
  381.     }
  382.     public function setPresenter(?self $presenter): self
  383.     {
  384.         $this->presenter $presenter;
  385.         return $this;
  386.     }
  387.     public function getUniquePresenterCode(): ?int
  388.     {
  389.         return $this->uniquePresenterCode;
  390.     }
  391.     public function setUniquePresenterCode(?int $uniquePresenterCode): self
  392.     {
  393.         $this->uniquePresenterCode $uniquePresenterCode;
  394.         return $this;
  395.     }
  396.     public function getLastBuy(): ?\DateTimeInterface
  397.     {
  398.         return $this->lastBuy;
  399.     }
  400.     public function setLastBuy(?\DateTimeInterface $lastBuy): self
  401.     {
  402.         $this->lastBuy $lastBuy;
  403.         return $this;
  404.     }
  405.     public function getSubUserCount(): ?int
  406.     {
  407.         return $this->subUserCount;
  408.     }
  409.     public function setSubUserCount(int $subUserCount): self
  410.     {
  411.         $this->subUserCount $subUserCount;
  412.         return $this;
  413.     }
  414.     public function getInterestRate(): ?int
  415.     {
  416.         return $this->interestRate;
  417.     }
  418.     public function setInterestRate(?int $interestRate): self
  419.     {
  420.         $this->interestRate $interestRate;
  421.         return $this;
  422.     }
  423.     public function getTelegramChannel(): ?string
  424.     {
  425.         return $this->telegramChannel;
  426.     }
  427.     public function setTelegramChannel(?string $telegramChannel): self
  428.     {
  429.         $this->telegramChannel $telegramChannel;
  430.         return $this;
  431.     }
  432.     public function getCustomerText(): ?string
  433.     {
  434.         return $this->customerText;
  435.     }
  436.     public function setCustomerText(?string $customerText): self
  437.     {
  438.         $this->customerText $customerText;
  439.         return $this;
  440.     }
  441.     public function getThisMonthCharge(): ?int
  442.     {
  443.         return $this->thisMonthCharge;
  444.     }
  445.     public function setThisMonthCharge(?int $thisMonthCharge): self
  446.     {
  447.         $this->thisMonthCharge $thisMonthCharge;
  448.         return $this;
  449.     }
  450.     /**
  451.      * @return Collection<int, Transaction>
  452.      */
  453.     public function getMadeTransactions(): Collection
  454.     {
  455.         return $this->madeTransactions;
  456.     }
  457.     public function addMadeTransaction(Transaction $madeTransaction): self
  458.     {
  459.         if (!$this->madeTransactions->contains($madeTransaction)) {
  460.             $this->madeTransactions->add($madeTransaction);
  461.             $madeTransaction->setAuthor($this);
  462.         }
  463.         return $this;
  464.     }
  465.     public function removeMadeTransaction(Transaction $madeTransaction): self
  466.     {
  467.         if ($this->madeTransactions->removeElement($madeTransaction)) {
  468.             // set the owning side to null (unless already changed)
  469.             if ($madeTransaction->getAuthor() === $this) {
  470.                 $madeTransaction->setAuthor(null);
  471.             }
  472.         }
  473.         return $this;
  474.     }
  475.     public function getAdvertiser(): ?self
  476.     {
  477.         return $this->advertiser;
  478.     }
  479.     public function setAdvertiser(?self $advertiser): self
  480.     {
  481.         $this->advertiser $advertiser;
  482.         return $this;
  483.     }
  484.     /**
  485.      * @return Collection<int, self>
  486.      */
  487.     public function getAdvertisedUsers(): Collection
  488.     {
  489.         return $this->advertisedUsers;
  490.     }
  491.     public function addAdvertisedUser(self $advertisedUser): self
  492.     {
  493.         if (!$this->advertisedUsers->contains($advertisedUser)) {
  494.             $this->advertisedUsers->add($advertisedUser);
  495.             $advertisedUser->setAdvertiser($this);
  496.         }
  497.         return $this;
  498.     }
  499.     public function removeAdvertisedUser(self $advertisedUser): self
  500.     {
  501.         if ($this->advertisedUsers->removeElement($advertisedUser)) {
  502.             // set the owning side to null (unless already changed)
  503.             if ($advertisedUser->getAdvertiser() === $this) {
  504.                 $advertisedUser->setAdvertiser(null);
  505.             }
  506.         }
  507.         return $this;
  508.     }
  509.     /**
  510.      * @return array|null
  511.      */
  512.     public function getUserTrace(): ?array
  513.     {
  514.         return json_decode($this->userTrace true);
  515.     }
  516.     /**
  517.      * @param array|null $userTrace
  518.      */
  519.     public function setUserTrace(?array $userTrace): void
  520.     {
  521.         $this->userTrace json_encode($userTrace);
  522.     }
  523.     public function getCampaign(): ?Campaign
  524.     {
  525.         return $this->campaign;
  526.     }
  527.     public function setCampaign(?Campaign $campaign): static
  528.     {
  529.         $this->campaign $campaign;
  530.         return $this;
  531.     }
  532.     /**
  533.      * @return Collection<int, Domain>
  534.      */
  535.     public function getDomains(): Collection
  536.     {
  537.         return $this->domains;
  538.     }
  539.     public function addDomain(Domain $domain): static
  540.     {
  541.         if (!$this->domains->contains($domain)) {
  542.             $this->domains->add($domain);
  543.             $domain->setOwner($this);
  544.         }
  545.         return $this;
  546.     }
  547.     public function removeDomain(Domain $domain): static
  548.     {
  549.         if ($this->domains->removeElement($domain)) {
  550.             // set the owning side to null (unless already changed)
  551.             if ($domain->getOwner() === $this) {
  552.                 $domain->setOwner(null);
  553.             }
  554.         }
  555.         return $this;
  556.     }
  557.     public function isVerified(): bool
  558.     {
  559.         return $this->isVerified;
  560.     }
  561.     public function setIsVerified(bool $isVerified): void
  562.     {
  563.         $this->isVerified $isVerified;
  564.     }
  565.     public function isIsTelegramContact(): ?bool
  566.     {
  567.         return $this->isTelegramContact;
  568.     }
  569.     public function setIsTelegramContact(?bool $isTelegramContact): static
  570.     {
  571.         $this->isTelegramContact $isTelegramContact;
  572.         return $this;
  573.     }
  574.     public function isIsTelegramContactChecked(): ?bool
  575.     {
  576.         return $this->isTelegramContactChecked;
  577.     }
  578.     public function setIsTelegramContactChecked(?bool $isTelegramContactChecked): static
  579.     {
  580.         $this->isTelegramContactChecked $isTelegramContactChecked;
  581.         return $this;
  582.     }
  583.     /**
  584.      * @return Collection<int, Bot>
  585.      */
  586.     public function getBots(): Collection
  587.     {
  588.         return $this->bots;
  589.     }
  590.     public function addBot(Bot $bot): static
  591.     {
  592.         if (!$this->bots->contains($bot)) {
  593.             $this->bots->add($bot);
  594.             $bot->setOwner($this);
  595.         }
  596.         return $this;
  597.     }
  598.     public function removeBot(Bot $bot): static
  599.     {
  600.         if ($this->bots->removeElement($bot)) {
  601.             // set the owning side to null (unless already changed)
  602.             if ($bot->getOwner() === $this) {
  603.                 $bot->setOwner(null);
  604.             }
  605.         }
  606.         return $this;
  607.     }
  608.     /**
  609.      * @return Collection<int, Idea>
  610.      */
  611.     public function getIdeas(): Collection
  612.     {
  613.         return $this->ideas;
  614.     }
  615.     public function addIdea(Idea $idea): static
  616.     {
  617.         if (!$this->ideas->contains($idea)) {
  618.             $this->ideas->add($idea);
  619.             $idea->setAuthor($this);
  620.         }
  621.         return $this;
  622.     }
  623.     public function removeIdea(Idea $idea): static
  624.     {
  625.         if ($this->ideas->removeElement($idea)) {
  626.             // set the owning side to null (unless already changed)
  627.             if ($idea->getAuthor() === $this) {
  628.                 $idea->setAuthor(null);
  629.             }
  630.         }
  631.         return $this;
  632.     }
  633.     public function getCardNumberToCharge(): ?string
  634.     {
  635.         return $this->cardNumberToCharge;
  636.     }
  637.     public function setCardNumberToCharge(?string $cardNumberToCharge): static
  638.     {
  639.         $this->cardNumberToCharge $cardNumberToCharge;
  640.         return $this;
  641.     }
  642.     public function getTheme(): ?string
  643.     {
  644. //        if ($this->hasRole('ROLE_ADMIN')){
  645.             return 'neon';
  646. //        }
  647. //        return 'default';
  648. //        return $this->theme?:'default';
  649.     }
  650.     public function setTheme(?string $theme): static
  651.     {
  652.         $this->theme $theme;
  653.         return $this;
  654.     }
  655.     public function getAdvertiserMonthlyIncome(): ?string
  656.     {
  657.         return $this->advertiserMonthlyIncome;
  658.     }
  659.     public function setAdvertiserMonthlyIncome(?string $advertiserMonthlyIncome): static
  660.     {
  661.         $this->advertiserMonthlyIncome $advertiserMonthlyIncome;
  662.         return $this;
  663.     }
  664.     public function getConnectedTelegramUserId(): ?array
  665.     {
  666.         return json_decode($this->connectedTelegramUserId true);
  667.     }
  668.     public function setConnectedTelegramUserId(?array $connectedTelegramUserId): static
  669.     {
  670.         $this->connectedTelegramUserId json_encode($connectedTelegramUserId);
  671.         return $this;
  672.     }
  673.     /**
  674.      * @return Collection<int, ArzDigital>
  675.      */
  676.     public function getArzDigitals(): Collection
  677.     {
  678.         return $this->arzDigitals;
  679.     }
  680.     public function addArzDigital(ArzDigital $arzDigital): static
  681.     {
  682.         if (!$this->arzDigitals->contains($arzDigital)) {
  683.             $this->arzDigitals->add($arzDigital);
  684.             $arzDigital->setPanelOwner($this);
  685.         }
  686.         return $this;
  687.     }
  688.     public function removeArzDigital(ArzDigital $arzDigital): static
  689.     {
  690.         if ($this->arzDigitals->removeElement($arzDigital)) {
  691.             // set the owning side to null (unless already changed)
  692.             if ($arzDigital->getPanelOwner() === $this) {
  693.                 $arzDigital->setPanelOwner(null);
  694.             }
  695.         }
  696.         return $this;
  697.     }
  698.     public function getVpnServicesCount(): ?int
  699.     {
  700.         return $this->VpnServicesCount;
  701.     }
  702.     public function setVpnServicesCount(?int $VpnServicesCount): static
  703.     {
  704.         $this->VpnServicesCount $VpnServicesCount;
  705.         return $this;
  706.     }
  707.     public function getGiftWallet(): ?string
  708.     {
  709.         return $this->giftWallet;
  710.     }
  711.     public function setGiftWallet(?string $giftWallet): static
  712.     {
  713.         $this->giftWallet $giftWallet;
  714.         return $this;
  715.     }
  716.     /**
  717.      * @return Collection<int, Ip>
  718.      */
  719.     public function getHetznerIps(): Collection
  720.     {
  721.         return $this->hetznerIps;
  722.     }
  723.     public function addHetznerIp(Ip $hetznerIp): static
  724.     {
  725.         if (!$this->hetznerIps->contains($hetznerIp)) {
  726.             $this->hetznerIps->add($hetznerIp);
  727.             $hetznerIp->setOwner($this);
  728.         }
  729.         return $this;
  730.     }
  731.     public function removeHetznerIp(Ip $hetznerIp): static
  732.     {
  733.         if ($this->hetznerIps->removeElement($hetznerIp)) {
  734.             // set the owning side to null (unless already changed)
  735.             if ($hetznerIp->getOwner() === $this) {
  736.                 $hetznerIp->setOwner(null);
  737.             }
  738.         }
  739.         return $this;
  740.     }
  741.     /**
  742.      * @return Collection<int, Server>
  743.      */
  744.     public function getHetznerServers(): Collection
  745.     {
  746.         return $this->hetznerServers;
  747.     }
  748.     public function addHetznerServer(Server $hetznerServer): static
  749.     {
  750.         if (!$this->hetznerServers->contains($hetznerServer)) {
  751.             $this->hetznerServers->add($hetznerServer);
  752.             $hetznerServer->setOwner($this);
  753.         }
  754.         return $this;
  755.     }
  756.     public function removeHetznerServer(Server $hetznerServer): static
  757.     {
  758.         if ($this->hetznerServers->removeElement($hetznerServer)) {
  759.             // set the owning side to null (unless already changed)
  760.             if ($hetznerServer->getOwner() === $this) {
  761.                 $hetznerServer->setOwner(null);
  762.             }
  763.         }
  764.         return $this;
  765.     }
  766.     /**
  767.      * @return Collection<int, StreamMasters>
  768.      */
  769.     public function getStreamMasters(): Collection
  770.     {
  771.         return $this->streamMasters;
  772.     }
  773.     public function addStreamMaster(StreamMasters $streamMaster): static
  774.     {
  775.         if (!$this->streamMasters->contains($streamMaster)) {
  776.             $this->streamMasters->add($streamMaster);
  777.             $streamMaster->setOwner($this);
  778.         }
  779.         return $this;
  780.     }
  781.     public function removeStreamMaster(StreamMasters $streamMaster): static
  782.     {
  783.         if ($this->streamMasters->removeElement($streamMaster)) {
  784.             // set the owning side to null (unless already changed)
  785.             if ($streamMaster->getOwner() === $this) {
  786.                 $streamMaster->setOwner(null);
  787.             }
  788.         }
  789.         return $this;
  790.     }
  791.     /**
  792.      * @return Collection<int, DonateKon>
  793.      */
  794.     public function getDonateKons(): Collection
  795.     {
  796.         return $this->donateKons;
  797.     }
  798.     public function addDonateKon(DonateKon $donateKon): static
  799.     {
  800.         if (!$this->donateKons->contains($donateKon)) {
  801.             $this->donateKons->add($donateKon);
  802.             $donateKon->setOwner($this);
  803.         }
  804.         return $this;
  805.     }
  806.     public function removeDonateKon(DonateKon $donateKon): static
  807.     {
  808.         if ($this->donateKons->removeElement($donateKon)) {
  809.             // set the owning side to null (unless already changed)
  810.             if ($donateKon->getOwner() === $this) {
  811.                 $donateKon->setOwner(null);
  812.             }
  813.         }
  814.         return $this;
  815.     }
  816.     /**
  817.      * @return Collection<int, Ticket>
  818.      */
  819.     public function getTickets(): Collection
  820.     {
  821.         return $this->tickets;
  822.     }
  823.     public function addTicket(Ticket $ticket): static
  824.     {
  825.         if (!$this->tickets->contains($ticket)) {
  826.             $this->tickets->add($ticket);
  827.             $ticket->setCreator($this);
  828.         }
  829.         return $this;
  830.     }
  831.     public function removeTicket(Ticket $ticket): static
  832.     {
  833.         if ($this->tickets->removeElement($ticket)) {
  834.             // set the owning side to null (unless already changed)
  835.             if ($ticket->getCreator() === $this) {
  836.                 $ticket->setCreator(null);
  837.             }
  838.         }
  839.         return $this;
  840.     }
  841.     /**
  842.      * @return Collection<int, TicketMessage>
  843.      */
  844.     public function getTicketMessages(): Collection
  845.     {
  846.         return $this->ticketMessages;
  847.     }
  848.     public function addTicketMessage(TicketMessage $ticketMessage): static
  849.     {
  850.         if (!$this->ticketMessages->contains($ticketMessage)) {
  851.             $this->ticketMessages->add($ticketMessage);
  852.             $ticketMessage->setAuthor($this);
  853.         }
  854.         return $this;
  855.     }
  856.     public function removeTicketMessage(TicketMessage $ticketMessage): static
  857.     {
  858.         if ($this->ticketMessages->removeElement($ticketMessage)) {
  859.             // set the owning side to null (unless already changed)
  860.             if ($ticketMessage->getAuthor() === $this) {
  861.                 $ticketMessage->setAuthor(null);
  862.             }
  863.         }
  864.         return $this;
  865.     }
  866.     /**
  867.      * @return Collection<int, \App\Entity\SAAS\Domain\Domain>
  868.      */
  869.     public function getBoughtDomains(): Collection
  870.     {
  871.         return $this->boughtDomains;
  872.     }
  873.     public function addBoughtDomain(\App\Entity\SAAS\Domain\Domain $boughtDomain): static
  874.     {
  875.         if (!$this->boughtDomains->contains($boughtDomain)) {
  876.             $this->boughtDomains->add($boughtDomain);
  877.             $boughtDomain->setOwner($this);
  878.         }
  879.         return $this;
  880.     }
  881.     public function removeBoughtDomain(\App\Entity\SAAS\Domain\Domain $boughtDomain): static
  882.     {
  883.         if ($this->boughtDomains->removeElement($boughtDomain)) {
  884.             // set the owning side to null (unless already changed)
  885.             if ($boughtDomain->getOwner() === $this) {
  886.                 $boughtDomain->setOwner(null);
  887.             }
  888.         }
  889.         return $this;
  890.     }
  891. }