<?php
namespace App\Entity;
use App\Repository\UsersRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ORM\Entity(repositoryClass=UsersRepository::class)
*/
class Users implements UserInterface, \Serializable
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $idPunch = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $firstname = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $lastname = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $email = null;
/**
* @ORM\Column(type="datetime")
*/
private $createdAt;
/**
* @ORM\Column(type="boolean")
*/
private $deleted = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $token = null;
/**
* @ORM\Column(type="string", length=255)
*/
private $password;
/**
* @ORM\Column(type="boolean")
*/
private $validated = true;
/**
* @ORM\OneToMany(targetEntity=NumberOfCardCustomer::class, mappedBy="customer")
*/
private $numberOfCardCustomers;
/**
* @ORM\OneToMany(targetEntity=TypeEstablishment::class, mappedBy="createdBy")
*/
private $typeEstablishments;
/**
* @ORM\OneToMany(targetEntity=ReferenceUserEstablishment::class, mappedBy="user")
*/
private $referenceUserEstablishments;
/**
* @ORM\OneToMany(targetEntity=UserEstablishment::class, mappedBy="user")
*/
private $userEstablishments;
/**
* @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="createdBy")
*/
private $shoppingCarts;
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="validatedBy")
*/
private $ordersValidated;
/**
* @ORM\OneToMany(targetEntity=OrderArticle::class, mappedBy="createdBy")
*/
private $createdOrderArticle;
/**
* @ORM\OneToMany(targetEntity=RequestModification::class, mappedBy="createdBy")
*/
private $requestModifications;
/**
* @ORM\OneToMany(targetEntity=RequestModification::class, mappedBy="responsable")
*/
private $requestModificationsResponsable;
/**
* @ORM\OneToMany(targetEntity=Establishments::class, mappedBy="responsable")
*/
private $establishments;
/**
* @ORM\ManyToOne(targetEntity=Users::class, inversedBy="myCustomers")
*/
private $myResponsable;
/**
* @ORM\OneToMany(targetEntity=Users::class, mappedBy="myResponsable")
*/
private $myCustomers;
/**
* @ORM\Column(type="boolean")
*/
private $notPresent = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $city = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $zip = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $numberPhone = null;
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="user")
*/
private $orders;
/**
* @ORM\Column(type="float", nullable=true)
*/
private $points = null;
/**
* @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="user")
*/
private $shoppingCartsUsers;
/**
* @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="updatedBy")
*/
private $shppingCartsUpdatedBy;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $clientCard = null;
/**
* @ORM\Column(type="boolean")
*/
private $cgvAccepted = false;
/**
* @ORM\OneToMany(targetEntity=Orders::class, mappedBy="lastPickupUpdateBy")
*/
private $lastPickupUpdateOrder;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $genre = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $address = null;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $TvaNumber = null;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $newPasswordCode = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $newPasswordCreatedAt = null;
/**
* @ORM\Column(type="boolean")
*/
private $emailValidated = false;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $emailValidationToken = null;
/**
* @ORM\OneToMany(targetEntity=Favorite::class, mappedBy="User")
*/
private $favorites;
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $newPasswordToken = null;
/**
* @ORM\ManyToOne(targetEntity=UserStatusIntern::class, inversedBy="users")
*/
private $statusIntern;
/**
* @ORM\OneToMany(targetEntity=Banner::class, mappedBy="createdBy")
*/
private $banners;
/**
* @ORM\ManyToOne(targetEntity=TVA::class, inversedBy="users")
*/
private $tva;
/**
* @ORM\Column(type="boolean")
*/
private $firstConnexion = false;
/**
* @ORM\OneToMany(targetEntity=Invoice::class, mappedBy="user")
*/
private $invoices;
/**
* @ORM\OneToMany(targetEntity=EmailInvoice::class, mappedBy="addedBy")
*/
private $emailInvoices;
/**
* @ORM\OneToMany(targetEntity=ArticleOrderOutOfStock::class, mappedBy="user")
*/
private $articleOrderOutOfStocks;
/**
* @ORM\OneToMany(targetEntity=BackOrder::class, mappedBy="createdBy")
*/
private $backOrders;
/**
* @ORM\OneToMany(targetEntity=InvoiceDownloads::class, mappedBy="user")
*/
private $invoiceDownloads;
/**
* @ORM\OneToMany(targetEntity=Articles::class, mappedBy="visibleBy")
*/
private $articlesChangeVisibility;
/**
* @ORM\OneToMany(targetEntity=ChildTags::class, mappedBy="updatedBy")
*/
private $childTagsUpdate;
/**
* @ORM\OneToMany(targetEntity=TagGroups::class, mappedBy="updatedBy")
*/
private $tagGroupsUpdate;
/**
* @ORM\OneToMany(targetEntity=Feedback::class, mappedBy="user")
*/
private $feedback;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private $deletedAt = null;
/**
* @ORM\ManyToOne(targetEntity=Users::class)
*/
private $deletedBy;
/**
* @ORM\Column(type="string", nullable=true)
*/
private $zendeskId = null;
/**
* @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="usersConnected")
*/
private $connectedAt;
/**
* @ORM\OneToMany(targetEntity=ListRestriction::class, mappedBy="createdBy")
*/
private $listRestrictions;
/**
* @ORM\OneToMany(targetEntity=ListRestrictionEstablishment::class, mappedBy="createdBy")
*/
private $getListRestrictionEstablishmentsCreatedBy;
public function __construct()
{
$this->createdAt = new \DateTime();
$this->numberOfCardCustomers = new ArrayCollection();
$this->typeEstablishments = new ArrayCollection();
$this->referenceUserEstablishments = new ArrayCollection();
$this->userEstablishments = new ArrayCollection();
$this->shoppingCarts = new ArrayCollection();
$this->ordersValidated = new ArrayCollection();
$this->createdOrderArticle = new ArrayCollection();
$this->requestModifications = new ArrayCollection();
$this->requestModificationsResponsable = new ArrayCollection();
$this->establishments = new ArrayCollection();
$this->myCustomers = new ArrayCollection();
$this->orders = new ArrayCollection();
$this->shoppingCartsUsers = new ArrayCollection();
$this->shppingCartsUpdatedBy = new ArrayCollection();
$this->lastPickupUpdateOrder = new ArrayCollection();
$this->favorites = new ArrayCollection();
$this->banners = new ArrayCollection();
$this->invoices = new ArrayCollection();
$this->emailInvoices = new ArrayCollection();
$this->articleOrderOutOfStocks = new ArrayCollection();
$this->backOrders = new ArrayCollection();
$this->invoiceDownloads = new ArrayCollection();
$this->articlesChangeVisibility = new ArrayCollection();
$this->childTagsUpdate = new ArrayCollection();
$this->tagGroupsUpdate = new ArrayCollection();
$this->feedback = new ArrayCollection();
$this->listRestrictions = new ArrayCollection();
$this->getListRestrictionEstablishmentsCreatedBy = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function getIdPunch(): ?int
{
return $this->idPunch;
}
public function setIdPunch(?int $idPunch): self
{
$this->idPunch = $idPunch;
return $this;
}
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 getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getCreatedAt(): ?\DateTimeInterface
{
return $this->createdAt;
}
public function setCreatedAt(\DateTimeInterface $createdAt): self
{
$this->createdAt = $createdAt;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getToken(): ?string
{
return $this->token;
}
public function setToken(?string $token): self
{
$this->token = $token;
return $this;
}
public function isValidated(): ?bool
{
return $this->validated;
}
public function setValidated(bool $validated): self
{
$this->validated = $validated;
return $this;
}
/**
* @return Collection<int, NumberOfCardCustomer>
*/
public function getNumberOfCardCustomers(): Collection
{
return $this->numberOfCardCustomers;
}
public function addNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
{
if (!$this->numberOfCardCustomers->contains($numberOfCardCustomer)) {
$this->numberOfCardCustomers[] = $numberOfCardCustomer;
$numberOfCardCustomer->setCustomer($this);
}
return $this;
}
public function removeNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
{
if ($this->numberOfCardCustomers->removeElement($numberOfCardCustomer)) {
// set the owning side to null (unless already changed)
if ($numberOfCardCustomer->getCustomer() === $this) {
$numberOfCardCustomer->setCustomer(null);
}
}
return $this;
}
/**
* @return Collection<int, TypeEstablishment>
*/
public function getTypeEstablishments(): Collection
{
return $this->typeEstablishments;
}
public function addTypeEstablishment(TypeEstablishment $typeEstablishment): self
{
if (!$this->typeEstablishments->contains($typeEstablishment)) {
$this->typeEstablishments[] = $typeEstablishment;
$typeEstablishment->setCreatedBy($this);
}
return $this;
}
public function removeTypeEstablishment(TypeEstablishment $typeEstablishment): self
{
if ($this->typeEstablishments->removeElement($typeEstablishment)) {
// set the owning side to null (unless already changed)
if ($typeEstablishment->getCreatedBy() === $this) {
$typeEstablishment->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, ReferenceUserEstablishment>
*/
public function getReferenceUserEstablishments(): Collection
{
return $this->referenceUserEstablishments;
}
public function addReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
{
if (!$this->referenceUserEstablishments->contains($referenceUserEstablishment)) {
$this->referenceUserEstablishments[] = $referenceUserEstablishment;
$referenceUserEstablishment->setUser($this);
}
return $this;
}
public function removeReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
{
if ($this->referenceUserEstablishments->removeElement($referenceUserEstablishment)) {
// set the owning side to null (unless already changed)
if ($referenceUserEstablishment->getUser() === $this) {
$referenceUserEstablishment->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, UserEstablishment>
*/
public function getUserEstablishments(): Collection
{
return $this->userEstablishments;
}
public function addUserEstablishment(UserEstablishment $userEstablishment): self
{
if (!$this->userEstablishments->contains($userEstablishment)) {
$this->userEstablishments[] = $userEstablishment;
$userEstablishment->setUser($this);
}
return $this;
}
public function removeUserEstablishment(UserEstablishment $userEstablishment): self
{
if ($this->userEstablishments->removeElement($userEstablishment)) {
// set the owning side to null (unless already changed)
if ($userEstablishment->getUser() === $this) {
$userEstablishment->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, ShoppingCart>
*/
public function getShoppingCarts(): Collection
{
return $this->shoppingCarts;
}
public function addShoppingCart(ShoppingCart $shoppingCart): self
{
if (!$this->shoppingCarts->contains($shoppingCart)) {
$this->shoppingCarts[] = $shoppingCart;
$shoppingCart->setCreatedBy($this);
}
return $this;
}
public function removeShoppingCart(ShoppingCart $shoppingCart): self
{
if ($this->shoppingCarts->removeElement($shoppingCart)) {
// set the owning side to null (unless already changed)
if ($shoppingCart->getCreatedBy() === $this) {
$shoppingCart->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, Orders>
*/
public function getOrdersValidated(): Collection
{
return $this->ordersValidated;
}
public function addOrdersValidated(Orders $ordersValidated): self
{
if (!$this->ordersValidated->contains($ordersValidated)) {
$this->ordersValidated[] = $ordersValidated;
$ordersValidated->setValidatedBy($this);
}
return $this;
}
public function removeOrdersValidated(Orders $ordersValidated): self
{
if ($this->ordersValidated->removeElement($ordersValidated)) {
// set the owning side to null (unless already changed)
if ($ordersValidated->getValidatedBy() === $this) {
$ordersValidated->setValidatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, OrderArticle>
*/
public function getCreatedOrderArticle(): Collection
{
return $this->createdOrderArticle;
}
public function addCreatedOrderArticle(OrderArticle $createdOrderArticle): self
{
if (!$this->createdOrderArticle->contains($createdOrderArticle)) {
$this->createdOrderArticle[] = $createdOrderArticle;
$createdOrderArticle->setCreatedBy($this);
}
return $this;
}
public function removeCreatedOrderArticle(OrderArticle $createdOrderArticle): self
{
if ($this->createdOrderArticle->removeElement($createdOrderArticle)) {
// set the owning side to null (unless already changed)
if ($createdOrderArticle->getCreatedBy() === $this) {
$createdOrderArticle->setCreatedBy(null);
}
}
return $this;
}
public function eraseCredentials()
{
}
public function getSalt()
{
// you *may* need a real salt depending on your encoder
// see section on salt below
return null;
}
public function getUsername()
{
return $this->email;
}
public function getRoles()
{
$ROLE = [];
foreach ($this->userEstablishments as $userEstablishment){
if($userEstablishment->getStatus()){
$ROLE[] = 'ROLE_'.$userEstablishment->getStatus()->getDevName();
}
}
if(empty($ROLE)){
$ROLE = ["ROLE_USER"];
}
return $ROLE;
}
/** @see \Serializable::serialize() */
public function serialize()
{
return serialize(array(
$this->id,
$this->email,
$this->password,
// see section on salt below
// $this->salt,
));
}
/** @see \Serializable::unserialize() */
public function unserialize($serialized)
{
list(
$this->id,
$this->email,
$this->password,
// see section on salt below
// $this->salt
) = unserialize($serialized, array('allowed_classes' => false));
}
public function getRequestModification(): ?RequestModification
{
return $this->requestModification;
}
public function setRequestModification(?RequestModification $requestModification): self
{
$this->requestModification = $requestModification;
return $this;
}
/**
* @return Collection<int, RequestModification>
*/
public function getRequestModifications(): Collection
{
return $this->requestModifications;
}
public function addRequestModification(RequestModification $requestModification): self
{
if (!$this->requestModifications->contains($requestModification)) {
$this->requestModifications[] = $requestModification;
$requestModification->setCreatedBy($this);
}
return $this;
}
public function removeRequestModification(RequestModification $requestModification): self
{
if ($this->requestModifications->removeElement($requestModification)) {
// set the owning side to null (unless already changed)
if ($requestModification->getCreatedBy() === $this) {
$requestModification->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, RequestModification>
*/
public function getRequestModificationsResponsable(): Collection
{
return $this->requestModificationsResponsable;
}
public function addRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
{
if (!$this->requestModificationsResponsable->contains($requestModificationsResponsable)) {
$this->requestModificationsResponsable[] = $requestModificationsResponsable;
$requestModificationsResponsable->setResponsable($this);
}
return $this;
}
public function removeRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
{
if ($this->requestModificationsResponsable->removeElement($requestModificationsResponsable)) {
// set the owning side to null (unless already changed)
if ($requestModificationsResponsable->getResponsable() === $this) {
$requestModificationsResponsable->setResponsable(null);
}
}
return $this;
}
/**
* @return Collection<int, Establishments>
*/
public function getEstablishments(): Collection
{
return $this->establishments;
}
public function addEstablishment(Establishments $establishment): self
{
if (!$this->establishments->contains($establishment)) {
$this->establishments[] = $establishment;
$establishment->setResponsable($this);
}
return $this;
}
public function removeEstablishment(Establishments $establishment): self
{
if ($this->establishments->removeElement($establishment)) {
// set the owning side to null (unless already changed)
if ($establishment->getResponsable() === $this) {
$establishment->setResponsable(null);
}
}
return $this;
}
public function getMyResponsable(): ?self
{
return $this->myResponsable;
}
public function setMyResponsable(?self $myResponsable): self
{
$this->myResponsable = $myResponsable;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getMyCustomers(): Collection
{
return $this->myCustomers;
}
public function addMyCustomer(self $myCustomer): self
{
if (!$this->myCustomers->contains($myCustomer)) {
$this->myCustomers[] = $myCustomer;
$myCustomer->setMyResponsable($this);
}
return $this;
}
public function removeMyCustomer(self $myCustomer): self
{
if ($this->myCustomers->removeElement($myCustomer)) {
// set the owning side to null (unless already changed)
if ($myCustomer->getMyResponsable() === $this) {
$myCustomer->setMyResponsable(null);
}
}
return $this;
}
public function isNotPresent(): ?bool
{
return $this->notPresent;
}
public function setNotPresent(bool $notPresent): self
{
$this->notPresent = $notPresent;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(string $city): self
{
$this->city = $city;
return $this;
}
public function getZip(): ?string
{
return $this->zip;
}
public function setZip(string $zip): self
{
$this->zip = $zip;
return $this;
}
public function getNumberPhone(): ?string
{
return $this->numberPhone;
}
public function setNumberPhone(string $numberPhone): self
{
$this->numberPhone = $numberPhone;
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[] = $order;
$order->setUser($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->getUser() === $this) {
$order->setUser(null);
}
}
return $this;
}
public function getPoints(): ?float
{
return $this->points;
}
public function setPoints(?float $points): self
{
$this->points = $points;
return $this;
}
/**
* @return Collection<int, ShoppingCart>
*/
public function getShoppingCartsUsers(): Collection
{
return $this->shoppingCartsUsers;
}
public function addShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
{
if (!$this->shoppingCartsUsers->contains($shoppingCartsUser)) {
$this->shoppingCartsUsers[] = $shoppingCartsUser;
$shoppingCartsUser->setUser($this);
}
return $this;
}
public function removeShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
{
if ($this->shoppingCartsUsers->removeElement($shoppingCartsUser)) {
// set the owning side to null (unless already changed)
if ($shoppingCartsUser->getUser() === $this) {
$shoppingCartsUser->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, ShoppingCart>
*/
public function getShppingCartsUpdatedBy(): Collection
{
return $this->shppingCartsUpdatedBy;
}
public function addShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
{
if (!$this->shppingCartsUpdatedBy->contains($shppingCartsUpdatedBy)) {
$this->shppingCartsUpdatedBy[] = $shppingCartsUpdatedBy;
$shppingCartsUpdatedBy->setUpdatedBy($this);
}
return $this;
}
public function removeShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
{
if ($this->shppingCartsUpdatedBy->removeElement($shppingCartsUpdatedBy)) {
// set the owning side to null (unless already changed)
if ($shppingCartsUpdatedBy->getUpdatedBy() === $this) {
$shppingCartsUpdatedBy->setUpdatedBy(null);
}
}
return $this;
}
public function getClientCard(): ?string
{
return $this->clientCard;
}
public function setClientCard(?string $clientCard): self
{
$this->clientCard = $clientCard;
return $this;
}
public function isCgvAccepted(): ?bool
{
return $this->cgvAccepted;
}
public function setCgvAccepted(bool $cgvAccepted): self
{
$this->cgvAccepted = $cgvAccepted;
return $this;
}
/**
* @return Collection<int, Orders>
*/
public function getLastPickupUpdateOrder(): Collection
{
return $this->lastPickupUpdateOrder;
}
public function addLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
{
if (!$this->lastPickupUpdateOrder->contains($lastPickupUpdateOrder)) {
$this->lastPickupUpdateOrder[] = $lastPickupUpdateOrder;
$lastPickupUpdateOrder->setLastPickupUpdateBy($this);
}
return $this;
}
public function removeLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
{
if ($this->lastPickupUpdateOrder->removeElement($lastPickupUpdateOrder)) {
// set the owning side to null (unless already changed)
if ($lastPickupUpdateOrder->getLastPickupUpdateBy() === $this) {
$lastPickupUpdateOrder->setLastPickupUpdateBy(null);
}
}
return $this;
}
public function getGenre(): ?string
{
return $this->genre;
}
public function setGenre(?string $genre): self
{
$this->genre = $genre;
return $this;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(?string $address): self
{
$this->address = $address;
return $this;
}
public function getTvaNumber(): ?string
{
return $this->TvaNumber;
}
public function setTvaNumber(?string $TvaNumber): self
{
$this->TvaNumber = $TvaNumber;
return $this;
}
public function getNewPasswordCode(): ?int
{
return $this->newPasswordCode;
}
public function setNewPasswordCode(?int $newPasswordCode): self
{
$this->newPasswordCode = $newPasswordCode;
return $this;
}
public function isEmailValidated(): ?bool
{
return $this->emailValidated;
}
public function setEmailValidated(bool $emailValidated): self
{
$this->emailValidated = $emailValidated;
return $this;
}
public function getNewPasswordCreatedAt(): ?\DateTimeInterface
{
return $this->newPasswordCreatedAt;
}
public function setNewPasswordCreatedAt(?\DateTimeInterface $newPasswordCreatedAt): self
{
$this->newPasswordCreatedAt = $newPasswordCreatedAt;
return $this;
}
public function getEmailValidationToken(): ?string
{
return $this->emailValidationToken;
}
public function setEmailValidationToken(?string $emailValidationToken): self
{
$this->emailValidationToken = $emailValidationToken;
return $this;
}
/**
* @return Collection<int, Favorite>
*/
public function getFavorites(): Collection
{
return $this->favorites;
}
public function addFavorite(Favorite $favorite): self
{
if (!$this->favorites->contains($favorite)) {
$this->favorites[] = $favorite;
$favorite->setUser($this);
}
return $this;
}
public function removeFavorite(Favorite $favorite): self
{
if ($this->favorites->removeElement($favorite)) {
// set the owning side to null (unless already changed)
if ($favorite->getUser() === $this) {
$favorite->setUser(null);
}
}
return $this;
}
public function getNewPasswordToken(): ?string
{
return $this->newPasswordToken;
}
public function setNewPasswordToken(?string $newPasswordToken): self
{
$this->newPasswordToken = $newPasswordToken;
return $this;
}
public function getStatusIntern(): ?userStatusIntern
{
return $this->statusIntern;
}
public function setStatusIntern(?userStatusIntern $statusIntern): self
{
$this->statusIntern = $statusIntern;
return $this;
}
/**
* @return Collection<int, Banner>
*/
public function getBanners(): Collection
{
return $this->banners;
}
public function addBanner(Banner $banner): self
{
if (!$this->banners->contains($banner)) {
$this->banners[] = $banner;
$banner->setCreatedBy($this);
}
return $this;
}
public function removeBanner(Banner $banner): self
{
if ($this->banners->removeElement($banner)) {
// set the owning side to null (unless already changed)
if ($banner->getCreatedBy() === $this) {
$banner->setCreatedBy(null);
}
}
return $this;
}
public function getTva(): ?TVA
{
return $this->tva;
}
public function setTva(?TVA $tva): self
{
$this->tva = $tva;
return $this;
}
public function isFirstConnexion(): ?bool
{
return $this->firstConnexion;
}
public function setFirstConnexion(bool $firstConnexion): self
{
$this->firstConnexion = $firstConnexion;
return $this;
}
/**
* @return Collection<int, Invoice>
*/
public function getInvoices(): Collection
{
return $this->invoices;
}
public function addInvoice(Invoice $invoice): self
{
if (!$this->invoices->contains($invoice)) {
$this->invoices[] = $invoice;
$invoice->setUser($this);
}
return $this;
}
public function removeInvoice(Invoice $invoice): self
{
if ($this->invoices->removeElement($invoice)) {
// set the owning side to null (unless already changed)
if ($invoice->getUser() === $this) {
$invoice->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, EmailInvoice>
*/
public function getEmailInvoices(): Collection
{
return $this->emailInvoices;
}
public function addEmailInvoice(EmailInvoice $emailInvoice): self
{
if (!$this->emailInvoices->contains($emailInvoice)) {
$this->emailInvoices[] = $emailInvoice;
$emailInvoice->setAddedBy($this);
}
return $this;
}
public function removeEmailInvoice(EmailInvoice $emailInvoice): self
{
if ($this->emailInvoices->removeElement($emailInvoice)) {
// set the owning side to null (unless already changed)
if ($emailInvoice->getAddedBy() === $this) {
$emailInvoice->setAddedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, ArticleOrderOutOfStock>
*/
public function getArticleOrderOutOfStocks(): Collection
{
return $this->articleOrderOutOfStocks;
}
public function addArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
{
if (!$this->articleOrderOutOfStocks->contains($articleOrderOutOfStock)) {
$this->articleOrderOutOfStocks[] = $articleOrderOutOfStock;
$articleOrderOutOfStock->setUser($this);
}
return $this;
}
public function removeArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
{
if ($this->articleOrderOutOfStocks->removeElement($articleOrderOutOfStock)) {
// set the owning side to null (unless already changed)
if ($articleOrderOutOfStock->getUser() === $this) {
$articleOrderOutOfStock->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, BackOrder>
*/
public function getBackOrders(): Collection
{
return $this->backOrders;
}
public function addBackOrder(BackOrder $backOrder): self
{
if (!$this->backOrders->contains($backOrder)) {
$this->backOrders[] = $backOrder;
$backOrder->setUser($this);
}
return $this;
}
public function removeBackOrder(BackOrder $backOrder): self
{
if ($this->backOrders->removeElement($backOrder)) {
// set the owning side to null (unless already changed)
if ($backOrder->getUser() === $this) {
$backOrder->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, InvoiceDownloads>
*/
public function getInvoiceDownloads(): Collection
{
return $this->invoiceDownloads;
}
public function addInvoiceDownload(InvoiceDownloads $invoiceDownload): self
{
if (!$this->invoiceDownloads->contains($invoiceDownload)) {
$this->invoiceDownloads[] = $invoiceDownload;
$invoiceDownload->setUser($this);
}
return $this;
}
public function removeInvoiceDownload(InvoiceDownloads $invoiceDownload): self
{
if ($this->invoiceDownloads->removeElement($invoiceDownload)) {
// set the owning side to null (unless already changed)
if ($invoiceDownload->getUser() === $this) {
$invoiceDownload->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, Articles>
*/
public function getArticlesChangeVisibility(): Collection
{
return $this->articlesChangeVisibility;
}
public function addArticlesChangeVisibility(Articles $article): self
{
if (!$this->articlesChangeVisibility->contains($article)) {
$this->articlesChangeVisibility[] = $article;
$article->setVisibleBy($this);
}
return $this;
}
public function removeArticlesChangeVisibility(Articles $article): self
{
if ($this->articlesChangeVisibility->removeElement($article)) {
// set the owning side to null (unless already changed)
if ($article->getVisibleBy() === $this) {
$article->setVisibleBy(null);
}
}
return $this;
}
/**
* @return Collection<int, ChildTags>
*/
public function getChildTagsUpdate(): Collection
{
return $this->childTagsUpdate;
}
public function addChildTagsUpdate(ChildTags $childTagsUpdate): self
{
if (!$this->childTagsUpdate->contains($childTagsUpdate)) {
$this->childTagsUpdate[] = $childTagsUpdate;
$childTagsUpdate->setUpdatedBy($this);
}
return $this;
}
public function removeChildTagsUpdate(ChildTags $childTagsUpdate): self
{
if ($this->childTagsUpdate->removeElement($childTagsUpdate)) {
// set the owning side to null (unless already changed)
if ($childTagsUpdate->getUpdatedBy() === $this) {
$childTagsUpdate->setUpdatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, TagGroups>
*/
public function getTagGroupsUpdate(): Collection
{
return $this->TagGroupsUpdate;
}
public function addTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
{
if (!$this->tagGroupsUpdate->contains($tagGroupsUpdate)) {
$this->tagGroupsUpdate[] = $tagGroupsUpdate;
$tagGroupsUpdate->setUpdatedBy($this);
}
return $this;
}
public function removeTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
{
if ($this->tagGroupsUpdate->removeElement($tagGroupsUpdate)) {
// set the owning side to null (unless already changed)
if ($tagGroupsUpdate->getUpdatedBy() === $this) {
$tagGroupsUpdate->setUpdatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, Feedback>
*/
public function getFeedback(): Collection
{
return $this->feedback;
}
public function addFeedback(Feedback $feedback): self
{
if (!$this->feedback->contains($feedback)) {
$this->feedback[] = $feedback;
$feedback->setUser($this);
}
return $this;
}
public function removeFeedback(Feedback $feedback): self
{
if ($this->feedback->removeElement($feedback)) {
// set the owning side to null (unless already changed)
if ($feedback->getUser() === $this) {
$feedback->setUser(null);
}
}
return $this;
}
public function getDeletedAt(): ?\DateTimeInterface
{
return $this->deletedAt;
}
public function setDeletedAt(?\DateTimeInterface $deletedAt): self
{
$this->deletedAt = $deletedAt;
return $this;
}
public function getDeletedBy(): ?self
{
return $this->deletedBy;
}
public function setDeletedBy(?self $deletedBy): self
{
$this->deletedBy = $deletedBy;
return $this;
}
public function getZendeskId(): ?string
{
return $this->zendeskId;
}
public function setZendeskId(?string $zendeskId): self
{
$this->zendeskId = $zendeskId;
return $this;
}
public function getConnectedAt(): ?Establishments
{
return $this->connectedAt;
}
public function setConnectedAt(?Establishments $connectedAt): self
{
$this->connectedAt = $connectedAt;
return $this;
}
/**
* @return Collection<int, ListRestriction>
*/
public function getListRestrictions(): Collection
{
return $this->listRestrictions;
}
public function addListRestriction(ListRestriction $listRestriction): self
{
if (!$this->listRestrictions->contains($listRestriction)) {
$this->listRestrictions[] = $listRestriction;
$listRestriction->setCreatedBy($this);
}
return $this;
}
public function removeListRestriction(ListRestriction $listRestriction): self
{
if ($this->listRestrictions->removeElement($listRestriction)) {
// set the owning side to null (unless already changed)
if ($listRestriction->getCreatedBy() === $this) {
$listRestriction->setCreatedBy(null);
}
}
return $this;
}
/**
* @return Collection<int, ListRestrictionEstablishment>
*/
public function getGetListRestrictionEstablishmentsCreatedBy(): Collection
{
return $this->getListRestrictionEstablishmentsCreatedBy;
}
public function addGetListRestrictionEstablishmentsCreatedBy(ListRestrictionEstablishment $getListRestrictionEstablishmentsCreatedBy): self
{
if (!$this->getListRestrictionEstablishmentsCreatedBy->contains($getListRestrictionEstablishmentsCreatedBy)) {
$this->getListRestrictionEstablishmentsCreatedBy[] = $getListRestrictionEstablishmentsCreatedBy;
$getListRestrictionEstablishmentsCreatedBy->setCreatedBy($this);
}
return $this;
}
public function removeGetListRestrictionEstablishmentsCreatedBy(ListRestrictionEstablishment $getListRestrictionEstablishmentsCreatedBy): self
{
if ($this->getListRestrictionEstablishmentsCreatedBy->removeElement($getListRestrictionEstablishmentsCreatedBy)) {
// set the owning side to null (unless already changed)
if ($getListRestrictionEstablishmentsCreatedBy->getCreatedBy() === $this) {
$getListRestrictionEstablishmentsCreatedBy->setCreatedBy(null);
}
}
return $this;
}
}