src/Entity/User.php line 65
<?phpnamespace App\Entity;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use ApiPlatform\Metadata\ApiFilter;use ApiPlatform\Metadata\ApiProperty;use ApiPlatform\Metadata\ApiResource;use ApiPlatform\Metadata\Delete;use ApiPlatform\Metadata\Get;use ApiPlatform\Metadata\GetCollection;use ApiPlatform\Metadata\Patch;use ApiPlatform\Metadata\Post;use ApiPlatform\Metadata\Put;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use App\Repository\UserRepository;use App\State\UserPasswordHasher;use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;use Symfony\Component\Security\Core\User\UserInterface;use Symfony\Component\Serializer\Annotation\Groups;use Symfony\Component\Validator\Constraints as Assert;use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;use App\Controller\UserController;use App\Filter\CustomOrFilter; // Змініть імпорт на правильний// use ApiPlatform\Core\Metadata\Reswource\DeprecationMetadata;#[ORM\Table(name: 'users')]#[ApiResource(operations: [new GetCollection(),new Post(processor: UserPasswordHasher::class, validationContext: ['groups' => ['Default', 'user:create']]),new Get(),new Put(processor: UserPasswordHasher::class),new Patch(processor: UserPasswordHasher::class),new Post(name: 'me',uriTemplate: '/users/me',controller: UserController::class),new Delete()],normalizationContext: ['groups' => ['user:read']],denormalizationContext: ['groups' => ['user:create', 'user:update']],)]#[ORM\Entity(repositoryClass: UserRepository::class)]#[UniqueEntity(fields: ['username'], message: 'There is already an account with this username')]#[ApiFilter(CustomOrFilter::class,properties: ['firstName' => 'ipartial','lastName' => 'ipartial','codeUser' => 'exact','codeManager' => 'exact','location.id' => 'exact','events.id' => 'exact','specialty.id' => 'exact',])]#[ApiFilter(SearchFilter::class, properties: ['username' => 'exact','accounts.manager.id' => 'exact','phone' => 'exact',])]class User implements UserInterface, PasswordAuthenticatedUserInterface{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]#[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', 'user_docs:read', 'product:read', 'comment:read','history:read', 'posts:read'])]private ?int $id = null;#[ORM\Column(length: 180, unique: true)]#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read', 'user_docs:read', 'comment:read','history:read'])]private ?string $username = null;#[Groups(['user:read', 'user:update'])]#[ORM\Column]private array $roles = [];/*** @var string The hashed password*/#[ORM\Column]private ?string $password = null;#[Assert\NotBlank(groups: ['user:create'])]#[Groups(['user:create', 'user:update'])]private ?string $plainPassword = null;#[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', 'product:read', 'comment:read', 'posts:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $firstName = null;#[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', 'product:read', 'comment:read', 'posts:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $lastName = null;#[Groups(['user:read', 'user:create', 'user:update', 'account:read'])]#[ORM\Column(length: 100, nullable: true)]private ?string $phone = null;#[Groups(['user:read', 'user:create', 'user:update'])]#[ORM\Column(length: 255, nullable: true)]private ?string $address = null;#[Groups(['user:read', 'user:create', 'user:update'])]#[ORM\Column(length: 50, nullable: true)]private ?string $status = null;#[ORM\OneToMany(mappedBy: 'user', targetEntity: UserLikeList::class)]private Collection $userLikeLists;#[ORM\OneToMany(mappedBy: 'modified_user', targetEntity: Products::class)]private Collection $products;#[ORM\OneToMany(mappedBy: 'created_by', targetEntity: Products::class)]private Collection $create_products;#[ORM\OneToMany(mappedBy: 'client', targetEntity: Orders::class)]private Collection $orders;#[ORM\OneToMany(mappedBy: 'manager', targetEntity: Orders::class)]private Collection $managerOrders;#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $email = null;#[Groups(['user:read', 'user:create', 'user:update', 'read'])]#[ORM\OneToMany(mappedBy: 'user', targetEntity: Accounts::class)]private Collection $accounts;#[ORM\OneToMany(mappedBy: 'client', targetEntity: LoadInvoice::class)]private Collection $loadInvoices;#[ORM\OneToMany(mappedBy: 'manager', targetEntity: Accepted::class)]private Collection $acceptedsManager;#[ORM\OneToMany(mappedBy: 'client', targetEntity: Accepted::class)]private Collection $acceptedsClients;#[ORM\OneToMany(mappedBy: 'modified_user', targetEntity: AcceptedProduct::class)]private Collection $n;#[ORM\Column(length: 20, nullable: true)]#[Groups(['user:read', 'account:read', 'user:create', 'user:update', 'order:read', 'order_product:read'])]private ?string $codeUser = null;#[ORM\Column(length: 20, nullable: true)]#[Groups(['user:read', 'account:read', 'user:create', 'user:update', 'order:read', 'order_product:read'])]private ?string $codeManager = null;#[ORM\OneToMany(mappedBy: 'manager', targetEntity: Accounts::class)]private Collection $managerAccounts;#[ORM\OneToMany(mappedBy: 'client', targetEntity: PreOrder::class)]private Collection $preOrders;#[ORM\OneToMany(mappedBy: 'manager', targetEntity: PreOrder::class)]private Collection $ManagerPreOrders;#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $workSchedule = null;#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $telegram = null;#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read'])]#[ORM\Column(length: 255, nullable: true)]private ?string $viber = null;#[Groups(['user:read', 'user:create', 'user:update', 'read', 'account:read', 'posts:read'])]#[ORM\OneToMany(mappedBy: 'users', targetEntity: MediaObject::class)]private Collection $mediaObjects;#[ORM\ManyToMany(targetEntity: Coupons::class, mappedBy: 'users')]private Collection $coupons;#[ORM\OneToMany(mappedBy: 'users', targetEntity: UsersDocs::class)]private Collection $usersDocs;#[ORM\OneToMany(mappedBy: 'manager', targetEntity: ProductBalanceInStorage::class)]private Collection $productBalanceInStorages;#[Groups(['user:read', 'user:create', 'user:update'])]#[ORM\ManyToOne(inversedBy: 'users')]private ?Location $location = null;#[ORM\OneToMany(mappedBy: 'users', targetEntity: Comments::class)]private Collection $comments;#[ORM\OneToMany(mappedBy: 'created_by', targetEntity: Faq::class)]private Collection $faqs;#[ORM\OneToMany(mappedBy: 'modifiedUser', targetEntity: Faq::class)]private Collection $modifiedFaq;/*** @var Collection<int, UserRole>*/#[Groups(['user:read', 'user:create', 'user:update'])]#[ORM\OneToMany(mappedBy: 'users', targetEntity: UserRole::class, cascade:['persist', 'remove'])]private Collection $userRoles;/*** @var Collection<int, Specialty>*/#[ORM\ManyToMany(targetEntity: Specialty::class, inversedBy: 'users')]#[Groups(['user:read', 'user:create', 'user:update'])]private Collection $specialty;/*** @var Collection<int, Events>*/#[ORM\ManyToMany(targetEntity: Events::class, inversedBy: 'users')]#[Groups(['user:read', 'user:create', 'user:update'])]private Collection $events;/*** @var Collection<int, History>*/#[Groups(['user:read', 'user:create', 'user:update'])]#[ORM\OneToMany(mappedBy: 'owner', targetEntity: History::class)]private Collection $histories;#[ORM\Column(length: 100, nullable: true)]private ?string $actionToken = null;#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]private ?\DateTimeInterface $actionTime = null;/*** @var Collection<int, UserObjects>*/#[ORM\OneToMany(mappedBy: 'users', targetEntity: UserObjects::class)]private Collection $userObjects;/*** @var Collection<int, Posts>*/#[ORM\OneToMany(mappedBy: 'owner', targetEntity: Posts::class)]private Collection $posts;public function __construct(){$this->userLikeLists = new ArrayCollection();$this->products = new ArrayCollection();$this->create_products = new ArrayCollection();$this->orders = new ArrayCollection();$this->managerOrders = new ArrayCollection();$this->accounts = new ArrayCollection();$this->loadInvoices = new ArrayCollection();$this->acceptedsManager = new ArrayCollection();$this->acceptedsClients = new ArrayCollection();$this->n = new ArrayCollection();$this->managerAccounts = new ArrayCollection();$this->preOrders = new ArrayCollection();$this->ManagerPreOrders = new ArrayCollection();$this->mediaObjects = new ArrayCollection();$this->coupons = new ArrayCollection();$this->usersDocs = new ArrayCollection();$this->productBalanceInStorages = new ArrayCollection();$this->comments = new ArrayCollection();$this->faqs = new ArrayCollection();$this->modifiedFaq = new ArrayCollection();$this->userRoles = new ArrayCollection();$this->specialty = new ArrayCollection();$this->events = new ArrayCollection();$this->histories = new ArrayCollection();$this->userObjects = new ArrayCollection();$this->posts = new ArrayCollection();}public function getId(): ?int{return $this->id;}/*** @deprecated since Symfony 5.3, use getUserIdentifier instead*/public function getUsername(): string{return (string) $this->username;}public function setUsername(string $username): self{$this->username = $username;return $this;}/*** A visual identifier that represents this user.** @see UserInterface*/public function getUserIdentifier(): string{return (string) $this->username;}/*** @see UserInterface*/public function getRoles(): array{$roles = [];foreach ($this->userRoles as $userRole) {$roles[] = $userRole->getRole()->getName();}return array_unique($roles);}public function setRoles(array $roles): self{$this->roles = $roles;return $this;}/*** @see PasswordAuthenticatedUserInterface*/public function getPassword(): string{return $this->password;}public function setPassword(string $password): self{$this->password = $password;return $this;}public function getPlainPassword(): ?string{return $this->plainPassword;}public function setPlainPassword(?string $plainPassword): self{$this->plainPassword = $plainPassword;return $this;}/*** Returning a salt is only needed, if you are not using a modern* hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.** @see UserInterface*/public function getSalt(): ?string{return null;}/*** @see UserInterface*/public function eraseCredentials(){// If you store any temporary, sensitive data on the user, clear it here$this->plainPassword = null;}public function getFirstName(): ?string{return $this->firstName;}public function setFirstName(string $firstName): self{$this->firstName = $firstName;return $this;}public function getLastName(): ?string{return $this->lastName;}public function setLastName(string $lastName): self{$this->lastName = $lastName;return $this;}public function getPhone(): ?string{return $this->phone;}public function setPhone(?string $phone): self{$this->phone = $phone;return $this;}public function getAddress(): ?string{return $this->address;}public function setAddress(?string $address): self{$this->address = $address;return $this;}public function getStatus(): ?string{return $this->status;}public function setStatus(?string $status): self{$this->status = $status;return $this;}/*** @return Collection<int, UserLikeList>*/public function getUserLikeLists(): Collection{return $this->userLikeLists;}public function addUserLikeList(UserLikeList $userLikeList): self{if (!$this->userLikeLists->contains($userLikeList)) {$this->userLikeLists->add($userLikeList);$userLikeList->setUserId($this);}return $this;}public function removeUserLikeList(UserLikeList $userLikeList): self{if ($this->userLikeLists->removeElement($userLikeList)) {// set the owning side to null (unless already changed)if ($userLikeList->getUserId() === $this) {$userLikeList->setUserId(null);}}return $this;}/*** @return Collection<int, Products>*/public function getProducts(): Collection{return $this->products;}public function addProduct(Products $product): self{if (!$this->products->contains($product)) {$this->products->add($product);$product->setModifiedUserId($this);}return $this;}// public function removeProduct(Products $product): self// {// if ($this->products->removeElement($product)) {// // set the owning side to null (unless already changed)// if ($product->getModifiedUserId() === $this) {// $product->setModifiedUserId(null);// }// }// return $this;// }/*** @return Collection<int, Products>*/public function getCreateProducts(): Collection{return $this->create_products;}public function addCreateProduct(Products $createProduct): self{if (!$this->create_products->contains($createProduct)) {$this->create_products->add($createProduct);$createProduct->setCreatedBy($this);}return $this;}// public function removeCreateProduct(Products $createProduct): self// {// if ($this->create_products->removeElement($createProduct)) {// // set the owning side to null (unless already changed)// if ($createProduct->getCreatedBy() === $this) {// $createProduct->setCreatedBy(null);// }// }// return $this;// }/*** @return Collection<int, Orders>*/public function getOrders(): Collection{return $this->orders;}public function addOrder(Orders $order): self{if (!$this->orders->contains($order)) {$this->orders->add($order);$order->setUserId($this);}return $this;}// public function removeOrder(Orders $order): self// {// if ($this->orders->removeElement($order)) {// // set the owning side to null (unless already changed)// if ($order->getUserId() === $this) {// $order->setUserId(null);// }// }// return $this;// }/*** @return Collection<int, Orders>*/public function getManagerOrders(): Collection{return $this->managerOrders;}public function addManagerOrder(Orders $managerOrder): self{if (!$this->managerOrders->contains($managerOrder)) {$this->managerOrders->add($managerOrder);$managerOrder->setManagerId($this);}return $this;}// public function removeManagerOrder(Orders $managerOrder): self// {// if ($this->managerOrders->removeElement($managerOrder)) {// // set the owning side to null (unless already changed)// if ($managerOrder->getManagerId() === $this) {// $managerOrder->setManagerId(null);// }// }// return $this;// }public function getEmail(): ?string{return $this->email;}public function setEmail(?string $email): self{$this->email = $email;return $this;}/*** @return Collection<int, Accounts>*/public function getAccounts(): Collection{return $this->accounts;}public function addAccount(Accounts $account): self{if (!$this->accounts->contains($account)) {$this->accounts->add($account);$account->setUserId($this);}return $this;}public function removeAccount(Accounts $account): self{if ($this->accounts->removeElement($account)) {// set the owning side to null (unless already changed)if ($account->getUserId() === $this) {$account->setUserId(null);}}return $this;}/*** @return Collection<int, LoadInvoice>*/public function getLoadInvoices(): Collection{return $this->loadInvoices;}public function addLoadInvoice(LoadInvoice $loadInvoice): self{if (!$this->loadInvoices->contains($loadInvoice)) {$this->loadInvoices->add($loadInvoice);$loadInvoice->setClient($this);}return $this;}public function removeLoadInvoice(LoadInvoice $loadInvoice): self{if ($this->loadInvoices->removeElement($loadInvoice)) {// set the owning side to null (unless already changed)if ($loadInvoice->getClient() === $this) {$loadInvoice->setClient(null);}}return $this;}/*** @return Collection<int, Accepted>* acceptedsManager*acceptedsClients*/public function getAcceptedsManager(): Collection{return $this->acceptedsManager;}public function addAcceptedsManager(Accepted $acceptedsManager): self{if (!$this->acceptedsManager->contains($acceptedsManager)) {$this->acceptedsManager->add($acceptedsManager);$acceptedsManager->setManager($this);}return $this;}public function removeAcceptedsManager(Accepted $acceptedsManager): self{if ($this->acceptedsManager->removeElement($acceptedsManager)) {// set the owning side to null (unless already changed)if ($acceptedsManager->getManager() === $this) {$acceptedsManager->setManager(null);}}return $this;}/*** @return Collection<int, Accepted>* acceptedsManager*acceptedsClients*/public function getAcceptedsClients(): Collection{return $this->acceptedsClients;}public function addAcceptedsClients(Accepted $acceptedsClients): self{if (!$this->acceptedsClients->contains($acceptedsClients)) {$this->acceptedsClients->add($acceptedsClients);$acceptedsClients->setManager($this);}return $this;}public function removeAcceptedsClients(Accepted $acceptedsClients): self{if ($this->acceptedsClients->removeElement($acceptedsClients)) {// set the owning side to null (unless already changed)if ($acceptedsClients->getManager() === $this) {$acceptedsClients->setManager(null);}}return $this;}/*** @return Collection<int, AcceptedProduct>*/public function getN(): Collection{return $this->n;}public function addN(AcceptedProduct $n): self{if (!$this->n->contains($n)) {$this->n->add($n);$n->setModifiedUser($this);}return $this;}public function removeN(AcceptedProduct $n): self{if ($this->n->removeElement($n)) {// set the owning side to null (unless already changed)if ($n->getModifiedUser() === $this) {$n->setModifiedUser(null);}}return $this;}public function getCodeUser(): ?string{return $this->codeUser;}public function setCodeUser(string $codeUser): self{$this->codeUser = $codeUser;return $this;}public function getCodeManager(): ?string{return $this->codeManager;}public function setCodeManager(string $codeManager): self{$this->codeManager = $codeManager;return $this;}/*** @return Collection<int, Accounts>*/public function getManagerAccounts(): Collection{return $this->managerAccounts;}public function addManagerAccount(Accounts $managerAccount): self{if (!$this->managerAccounts->contains($managerAccount)) {$this->managerAccounts->add($managerAccount);$managerAccount->setManager($this);}return $this;}public function removeManagerAccount(Accounts $managerAccount): self{if ($this->managerAccounts->removeElement($managerAccount)) {// set the owning side to null (unless already changed)if ($managerAccount->getManager() === $this) {$managerAccount->setManager(null);}}return $this;}/*** @return Collection<int, PreOrder>*/public function getPreOrders(): Collection{return $this->preOrders;}public function addPreOrder(PreOrder $preOrder): self{if (!$this->preOrders->contains($preOrder)) {$this->preOrders->add($preOrder);$preOrder->setClient($this);}return $this;}public function removePreOrder(PreOrder $preOrder): self{if ($this->preOrders->removeElement($preOrder)) {// set the owning side to null (unless already changed)if ($preOrder->getClient() === $this) {$preOrder->setClient(null);}}return $this;}/*** @return Collection<int, PreOrder>*/public function getManagerPreOrders(): Collection{return $this->ManagerPreOrders;}public function addManagerPreOrder(PreOrder $managerPreOrder): self{if (!$this->ManagerPreOrders->contains($managerPreOrder)) {$this->ManagerPreOrders->add($managerPreOrder);$managerPreOrder->setManager($this);}return $this;}public function removeManagerPreOrder(PreOrder $managerPreOrder): self{if ($this->ManagerPreOrders->removeElement($managerPreOrder)) {// set the owning side to null (unless already changed)if ($managerPreOrder->getManager() === $this) {$managerPreOrder->setManager(null);}}return $this;}public function getWorkSchedule(): ?string{return $this->workSchedule;}public function setWorkSchedule(?string $workSchedule): self{$this->workSchedule = $workSchedule;return $this;}public function getTelegram(): ?string{return $this->telegram;}public function setTelegram(?string $telegram): self{$this->telegram = $telegram;return $this;}public function getViber(): ?string{return $this->viber;}public function setViber(?string $viber): self{$this->viber = $viber;return $this;}/*** @return Collection<int, MediaObject>*/public function getMediaObjects(): Collection{return $this->mediaObjects;}public function addMediaObject(MediaObject $mediaObject): self{if (!$this->mediaObjects->contains($mediaObject)) {$this->mediaObjects->add($mediaObject);$mediaObject->setUsers($this);}return $this;}public function removeMediaObject(MediaObject $mediaObject): self{if ($this->mediaObjects->removeElement($mediaObject)) {// set the owning side to null (unless already changed)if ($mediaObject->getUsers() === $this) {$mediaObject->setUsers(null);}}return $this;}/*** @return Collection<int, Coupons>*/public function getCoupons(): Collection{return $this->coupons;}public function addCoupon(Coupons $coupon): self{if (!$this->coupons->contains($coupon)) {$this->coupons->add($coupon);$coupon->addUser($this);}return $this;}public function removeCoupon(Coupons $coupon): self{if ($this->coupons->removeElement($coupon)) {$coupon->removeUser($this);}return $this;}/*** @return Collection<int, UsersDocs>*/public function getUsersDocs(): Collection{return $this->usersDocs;}public function addUsersDoc(UsersDocs $usersDoc): static{if (!$this->usersDocs->contains($usersDoc)) {$this->usersDocs->add($usersDoc);$usersDoc->setUsers($this);}return $this;}/*** @return Collection<int, ProductBalanceInStorage>*/public function getProductBalanceInStorages(): Collection{return $this->productBalanceInStorages;}public function addProductBalanceInStorage(ProductBalanceInStorage $productBalanceInStorage): self{if (!$this->productBalanceInStorages->contains($productBalanceInStorage)) {$this->productBalanceInStorages->add($productBalanceInStorage);$productBalanceInStorage->setManager($this);}return $this;}public function removeUsersDoc(UsersDocs $usersDoc): static{if ($this->usersDocs->removeElement($usersDoc)) {// set the owning side to null (unless already changed)if ($usersDoc->getUsers() === $this) {$usersDoc->setUsers(null);}}return $this;}public function removeProductBalanceInStorage(ProductBalanceInStorage $productBalanceInStorage): self{if ($this->productBalanceInStorages->removeElement($productBalanceInStorage)) {// set the owning side to null (unless already changed)if ($productBalanceInStorage->getManager() === $this) {$productBalanceInStorage->setManager(null);}}return $this;}public function getLocation(): ?Location{return $this->location;}public function setLocation(?Location $location): self{$this->location = $location;return $this;}/*** @return Collection<int, Comments>*/public function getComments(): Collection{return $this->comments;}public function addComment(Comments $comment): static{if (!$this->comments->contains($comment)) {$this->comments->add($comment);$comment->setUsers($this);}return $this;}public function removeComment(Comments $comment): static{if ($this->comments->removeElement($comment)) {// set the owning side to null (unless already changed)if ($comment->getUsers() === $this) {$comment->setUsers(null);}}return $this;}/*** @return Collection<int, Faq>*/public function getFaqs(): Collection{return $this->faqs;}public function addFaq(Faq $faq): static{if (!$this->faqs->contains($faq)) {$this->faqs->add($faq);$faq->setCreatedBy($this);}return $this;}public function removeFaq(Faq $faq): static{if ($this->faqs->removeElement($faq)) {// set the owning side to null (unless already changed)if ($faq->getCreatedBy() === $this) {$faq->setCreatedBy(null);}}return $this;}/*** @return Collection<int, Faq>*/public function getModifiedFaq(): Collection{return $this->modifiedFaq;}public function addModifiedFaq(Faq $modifiedFaq): static{if (!$this->modifiedFaq->contains($modifiedFaq)) {$this->modifiedFaq->add($modifiedFaq);$modifiedFaq->setModifiedUser($this);}return $this;}public function removeModifiedFaq(Faq $modifiedFaq): static{if ($this->modifiedFaq->removeElement($modifiedFaq)) {// set the owning side to null (unless already changed)if ($modifiedFaq->getModifiedUser() === $this) {$modifiedFaq->setModifiedUser(null);}}return $this;}/*** @return Collection<int, UserRole>*/public function getUserRoles(): Collection{return $this->userRoles;}public function addUserRole(UserRole $userRole): static{if (!$this->userRoles->contains($userRole)) {$this->userRoles->add($userRole);$userRole->setUsers($this);}return $this;}public function getActionToken(): ?string{return $this->actionToken;}public function setActionToken(?string $actionToken): static{$this->actionToken = $actionToken;return $this;}public function removeUserRole(UserRole $userRole): static{if ($this->userRoles->removeElement($userRole)) {// set the owning side to null (unless already changed)if ($userRole->getUsers() === $this) {$userRole->setUsers(null);}}return $this;}/*** @return Collection<int, Specialty>*/public function getSpecialty(): Collection{return $this->specialty;}public function addSpecialty(Specialty $specialty): static{if (!$this->specialty->contains($specialty)) {$this->specialty->add($specialty);}return $this;}public function removeSpecialty(Specialty $specialty): static{$this->specialty->removeElement($specialty);return $this;}/*** @return Collection<int, Events>*/public function getEvents(): Collection{return $this->events;}public function addEvent(Events $event): static{if (!$this->events->contains($event)) {$this->events->add($event);}return $this;}public function removeEvent(Events $event): static{$this->events->removeElement($event);return $this;}/*** @return Collection<int, History>*/public function getHistories(): Collection{return $this->histories;}public function addHistory(History $history): static{if (!$this->histories->contains($history)) {$this->histories->add($history);$history->setowner($this);}return $this;}public function removeHistory(History $history): static{if ($this->histories->removeElement($history)) {// set the owning side to null (unless already changed)if ($history->getowner() === $this) {$history->setowner(null);}}return $this;}public function getActionTime(): ?\DateTimeInterface{return $this->actionTime;}public function setActionTime(?\DateTimeInterface $actionTime): static{$this->actionTime = $actionTime;return $this;}/*** @return Collection<int, UserObjects>*/public function getUserObjects(): Collection{return $this->userObjects;}public function addUserObject(UserObjects $userObject): static{if (!$this->userObjects->contains($userObject)) {$this->userObjects->add($userObject);$userObject->setUsers($this);}return $this;}public function removeUserObject(UserObjects $userObject): static{if ($this->userObjects->removeElement($userObject)) {// set the owning side to null (unless already changed)if ($userObject->getUsers() === $this) {$userObject->setUsers(null);}}return $this;}/*** @return Collection<int, Posts>*/public function getPosts(): Collection{return $this->posts;}public function addPost(Posts $post): static{if (!$this->posts->contains($post)) {$this->posts->add($post);$post->setOwner($this);}return $this;}public function removePost(Posts $post): static{if ($this->posts->removeElement($post)) {// set the owning side to null (unless already changed)if ($post->getOwner() === $this) {$post->setOwner(null);}}return $this;}}