src/Entity/Users.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UsersRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Security\Core\User\UserInterface;
  8. /**
  9.  * @ORM\Entity(repositoryClass=UsersRepository::class)
  10.  */
  11. class Users implements UserInterface, \Serializable
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="integer", nullable=true)
  21.      */
  22.     private $idPunch null;
  23.     /**
  24.      * @ORM\Column(type="string", length=255, nullable=true)
  25.      */
  26.     private $firstname null;
  27.     /**
  28.      * @ORM\Column(type="string", length=255, nullable=true)
  29.      */
  30.     private $lastname null;
  31.     /**
  32.      * @ORM\Column(type="string", length=255, nullable=true)
  33.      */
  34.     private $email null;
  35.     /**
  36.      * @ORM\Column(type="datetime")
  37.      */
  38.     private $createdAt;
  39.     /**
  40.      * @ORM\Column(type="boolean")
  41.      */
  42.     private $deleted false;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true)
  45.      */
  46.     private $token null;
  47.     /**
  48.      * @ORM\Column(type="string", length=255)
  49.      */
  50.     private $password;
  51.     /**
  52.      * @ORM\Column(type="boolean")
  53.      */
  54.     private $validated true;
  55.     /**
  56.      * @ORM\OneToMany(targetEntity=NumberOfCardCustomer::class, mappedBy="customer")
  57.      */
  58.     private $numberOfCardCustomers;
  59.     /**
  60.      * @ORM\OneToMany(targetEntity=TypeEstablishment::class, mappedBy="createdBy")
  61.      */
  62.     private $typeEstablishments;
  63.     /**
  64.      * @ORM\OneToMany(targetEntity=ReferenceUserEstablishment::class, mappedBy="user")
  65.      */
  66.     private $referenceUserEstablishments;
  67.     /**
  68.      * @ORM\OneToMany(targetEntity=UserEstablishment::class, mappedBy="user")
  69.      */
  70.     private $userEstablishments;
  71.     /**
  72.      * @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="createdBy")
  73.      */
  74.     private $shoppingCarts;
  75.     /**
  76.      * @ORM\OneToMany(targetEntity=Orders::class, mappedBy="validatedBy")
  77.      */
  78.     private $ordersValidated;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity=OrderArticle::class, mappedBy="createdBy")
  81.      */
  82.     private $createdOrderArticle;
  83.     /**
  84.      * @ORM\OneToMany(targetEntity=RequestModification::class, mappedBy="createdBy")
  85.      */
  86.     private $requestModifications;
  87.     /**
  88.      * @ORM\OneToMany(targetEntity=RequestModification::class, mappedBy="responsable")
  89.      */
  90.     private $requestModificationsResponsable;
  91.     /**
  92.      * @ORM\OneToMany(targetEntity=Establishments::class, mappedBy="responsable")
  93.      */
  94.     private $establishments;
  95.     /**
  96.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="myCustomers")
  97.      */
  98.     private $myResponsable;
  99.     /**
  100.      * @ORM\OneToMany(targetEntity=Users::class, mappedBy="myResponsable")
  101.      */
  102.     private $myCustomers;
  103.     /**
  104.      * @ORM\Column(type="boolean")
  105.      */
  106.     private $notPresent false;
  107.     /**
  108.      * @ORM\Column(type="string", length=255, nullable=true)
  109.      */
  110.     private $city null;
  111.     /**
  112.      * @ORM\Column(type="string", length=255, nullable=true)
  113.      */
  114.     private $zip null;
  115.     /**
  116.      * @ORM\Column(type="string", length=255, nullable=true)
  117.      */
  118.     private $numberPhone null;
  119.     /**
  120.      * @ORM\OneToMany(targetEntity=Orders::class, mappedBy="user")
  121.      */
  122.     private $orders;
  123.     /**
  124.      * @ORM\Column(type="float", nullable=true)
  125.      */
  126.     private $points null;
  127.     /**
  128.      * @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="user")
  129.      */
  130.     private $shoppingCartsUsers;
  131.     /**
  132.      * @ORM\OneToMany(targetEntity=ShoppingCart::class, mappedBy="updatedBy")
  133.      */
  134.     private $shppingCartsUpdatedBy;
  135.     /**
  136.      * @ORM\Column(type="string", length=255, nullable=true)
  137.      */
  138.     private $clientCard null;
  139.     /**
  140.      * @ORM\Column(type="boolean")
  141.      */
  142.     private $cgvAccepted false;
  143.     /**
  144.      * @ORM\OneToMany(targetEntity=Orders::class, mappedBy="lastPickupUpdateBy")
  145.      */
  146.     private $lastPickupUpdateOrder;
  147.     /**
  148.      * @ORM\Column(type="string", length=255, nullable=true)
  149.      */
  150.     private $genre null;
  151.     /**
  152.      * @ORM\Column(type="string", length=255, nullable=true)
  153.      */
  154.     private $address null;
  155.     /**
  156.      * @ORM\Column(type="string", length=255, nullable=true)
  157.      */
  158.     private $TvaNumber null;
  159.     /**
  160.      * @ORM\Column(type="integer", nullable=true)
  161.      */
  162.     private $newPasswordCode null;
  163.     /**
  164.      * @ORM\Column(type="datetime", nullable=true)
  165.      */
  166.     private $newPasswordCreatedAt null;
  167.     /**
  168.      * @ORM\Column(type="boolean")
  169.      */
  170.     private $emailValidated false;
  171.     /**
  172.      * @ORM\Column(type="string", length=255, nullable=true)
  173.      */
  174.     private $emailValidationToken null;
  175.     /**
  176.      * @ORM\OneToMany(targetEntity=Favorite::class, mappedBy="User")
  177.      */
  178.     private $favorites;
  179.     /**
  180.      * @ORM\Column(type="string", length=255, nullable=true)
  181.      */
  182.     private $newPasswordToken null;
  183.     /**
  184.      * @ORM\ManyToOne(targetEntity=UserStatusIntern::class, inversedBy="users")
  185.      */
  186.     private $statusIntern;
  187.     /**
  188.      * @ORM\OneToMany(targetEntity=Banner::class, mappedBy="createdBy")
  189.      */
  190.     private $banners;
  191.     /**
  192.      * @ORM\ManyToOne(targetEntity=TVA::class, inversedBy="users")
  193.      */
  194.     private $tva;
  195.     /**
  196.      * @ORM\Column(type="boolean")
  197.      */
  198.     private $firstConnexion false;
  199.     /**
  200.      * @ORM\OneToMany(targetEntity=Invoice::class, mappedBy="user")
  201.      */
  202.     private $invoices;
  203.     /**
  204.      * @ORM\OneToMany(targetEntity=EmailInvoice::class, mappedBy="addedBy")
  205.      */
  206.     private $emailInvoices;
  207.     /**
  208.      * @ORM\OneToMany(targetEntity=ArticleOrderOutOfStock::class, mappedBy="user")
  209.      */
  210.     private $articleOrderOutOfStocks;
  211.     /**
  212.      * @ORM\OneToMany(targetEntity=BackOrder::class, mappedBy="createdBy")
  213.      */
  214.     private $backOrders;
  215.     /**
  216.      * @ORM\OneToMany(targetEntity=InvoiceDownloads::class, mappedBy="user")
  217.      */
  218.     private $invoiceDownloads;
  219.     /**
  220.      * @ORM\OneToMany(targetEntity=Articles::class, mappedBy="visibleBy")
  221.      */
  222.     private $articlesChangeVisibility;
  223.     /**
  224.      * @ORM\OneToMany(targetEntity=ChildTags::class, mappedBy="updatedBy")
  225.      */
  226.     private $childTagsUpdate;
  227.     /**
  228.      * @ORM\OneToMany(targetEntity=TagGroups::class, mappedBy="updatedBy")
  229.      */
  230.     private $tagGroupsUpdate;
  231.     /**
  232.      * @ORM\OneToMany(targetEntity=Feedback::class, mappedBy="user")
  233.      */
  234.     private $feedback;
  235.     /**
  236.      * @ORM\Column(type="datetime", nullable=true)
  237.      */
  238.     private $deletedAt null;
  239.     /**
  240.      * @ORM\ManyToOne(targetEntity=Users::class)
  241.      */
  242.     private $deletedBy;
  243.     /**
  244.      * @ORM\Column(type="string", nullable=true)
  245.      */
  246.     private $zendeskId null;
  247.     /**
  248.      * @ORM\ManyToOne(targetEntity=Establishments::class, inversedBy="usersConnected")
  249.      */
  250.     private $connectedAt;
  251.     /**
  252.      * @ORM\OneToMany(targetEntity=ListRestriction::class, mappedBy="createdBy")
  253.      */
  254.     private $listRestrictions;
  255.     /**
  256.      * @ORM\OneToMany(targetEntity=ListRestrictionEstablishment::class, mappedBy="createdBy")
  257.      */
  258.     private $getListRestrictionEstablishmentsCreatedBy;
  259.     public function __construct()
  260.     {
  261.         $this->createdAt = new \DateTime();
  262.         $this->numberOfCardCustomers = new ArrayCollection();
  263.         $this->typeEstablishments = new ArrayCollection();
  264.         $this->referenceUserEstablishments = new ArrayCollection();
  265.         $this->userEstablishments = new ArrayCollection();
  266.         $this->shoppingCarts = new ArrayCollection();
  267.         $this->ordersValidated = new ArrayCollection();
  268.         $this->createdOrderArticle = new ArrayCollection();
  269.         $this->requestModifications = new ArrayCollection();
  270.         $this->requestModificationsResponsable = new ArrayCollection();
  271.         $this->establishments = new ArrayCollection();
  272.         $this->myCustomers = new ArrayCollection();
  273.         $this->orders = new ArrayCollection();
  274.         $this->shoppingCartsUsers = new ArrayCollection();
  275.         $this->shppingCartsUpdatedBy = new ArrayCollection();
  276.         $this->lastPickupUpdateOrder = new ArrayCollection();
  277.         $this->favorites = new ArrayCollection();
  278.         $this->banners = new ArrayCollection();
  279.         $this->invoices = new ArrayCollection();
  280.         $this->emailInvoices = new ArrayCollection();
  281.         $this->articleOrderOutOfStocks = new ArrayCollection();
  282.         $this->backOrders = new ArrayCollection();
  283.         $this->invoiceDownloads = new ArrayCollection();
  284.         $this->articlesChangeVisibility = new ArrayCollection();
  285.         $this->childTagsUpdate = new ArrayCollection();
  286.         $this->tagGroupsUpdate = new ArrayCollection();
  287.         $this->feedback = new ArrayCollection();
  288.         $this->listRestrictions = new ArrayCollection();
  289.         $this->getListRestrictionEstablishmentsCreatedBy = new ArrayCollection();
  290.     }
  291.     public function getId(): ?int
  292.     {
  293.         return $this->id;
  294.     }
  295.     public function getPassword(): ?string
  296.     {
  297.         return $this->password;
  298.     }
  299.     public function setPassword(string $password): self
  300.     {
  301.         $this->password $password;
  302.         return $this;
  303.     }
  304.     public function getIdPunch(): ?int
  305.     {
  306.         return $this->idPunch;
  307.     }
  308.     public function setIdPunch(?int $idPunch): self
  309.     {
  310.         $this->idPunch $idPunch;
  311.         return $this;
  312.     }
  313.     public function getFirstname(): ?string
  314.     {
  315.         return $this->firstname;
  316.     }
  317.     public function setFirstname(?string $firstname): self
  318.     {
  319.         $this->firstname $firstname;
  320.         return $this;
  321.     }
  322.     public function getLastname(): ?string
  323.     {
  324.         return $this->lastname;
  325.     }
  326.     public function setLastname(?string $lastname): self
  327.     {
  328.         $this->lastname $lastname;
  329.         return $this;
  330.     }
  331.     public function getEmail(): ?string
  332.     {
  333.         return $this->email;
  334.     }
  335.     public function setEmail(?string $email): self
  336.     {
  337.         $this->email $email;
  338.         return $this;
  339.     }
  340.     public function getCreatedAt(): ?\DateTimeInterface
  341.     {
  342.         return $this->createdAt;
  343.     }
  344.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  345.     {
  346.         $this->createdAt $createdAt;
  347.         return $this;
  348.     }
  349.     public function isDeleted(): ?bool
  350.     {
  351.         return $this->deleted;
  352.     }
  353.     public function setDeleted(bool $deleted): self
  354.     {
  355.         $this->deleted $deleted;
  356.         return $this;
  357.     }
  358.     public function getToken(): ?string
  359.     {
  360.         return $this->token;
  361.     }
  362.     public function setToken(?string $token): self
  363.     {
  364.         $this->token $token;
  365.         return $this;
  366.     }
  367.     public function isValidated(): ?bool
  368.     {
  369.         return $this->validated;
  370.     }
  371.     public function setValidated(bool $validated): self
  372.     {
  373.         $this->validated $validated;
  374.         return $this;
  375.     }
  376.     /**
  377.      * @return Collection<int, NumberOfCardCustomer>
  378.      */
  379.     public function getNumberOfCardCustomers(): Collection
  380.     {
  381.         return $this->numberOfCardCustomers;
  382.     }
  383.     public function addNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
  384.     {
  385.         if (!$this->numberOfCardCustomers->contains($numberOfCardCustomer)) {
  386.             $this->numberOfCardCustomers[] = $numberOfCardCustomer;
  387.             $numberOfCardCustomer->setCustomer($this);
  388.         }
  389.         return $this;
  390.     }
  391.     public function removeNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
  392.     {
  393.         if ($this->numberOfCardCustomers->removeElement($numberOfCardCustomer)) {
  394.             // set the owning side to null (unless already changed)
  395.             if ($numberOfCardCustomer->getCustomer() === $this) {
  396.                 $numberOfCardCustomer->setCustomer(null);
  397.             }
  398.         }
  399.         return $this;
  400.     }
  401.     /**
  402.      * @return Collection<int, TypeEstablishment>
  403.      */
  404.     public function getTypeEstablishments(): Collection
  405.     {
  406.         return $this->typeEstablishments;
  407.     }
  408.     public function addTypeEstablishment(TypeEstablishment $typeEstablishment): self
  409.     {
  410.         if (!$this->typeEstablishments->contains($typeEstablishment)) {
  411.             $this->typeEstablishments[] = $typeEstablishment;
  412.             $typeEstablishment->setCreatedBy($this);
  413.         }
  414.         return $this;
  415.     }
  416.     public function removeTypeEstablishment(TypeEstablishment $typeEstablishment): self
  417.     {
  418.         if ($this->typeEstablishments->removeElement($typeEstablishment)) {
  419.             // set the owning side to null (unless already changed)
  420.             if ($typeEstablishment->getCreatedBy() === $this) {
  421.                 $typeEstablishment->setCreatedBy(null);
  422.             }
  423.         }
  424.         return $this;
  425.     }
  426.     /**
  427.      * @return Collection<int, ReferenceUserEstablishment>
  428.      */
  429.     public function getReferenceUserEstablishments(): Collection
  430.     {
  431.         return $this->referenceUserEstablishments;
  432.     }
  433.     public function addReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
  434.     {
  435.         if (!$this->referenceUserEstablishments->contains($referenceUserEstablishment)) {
  436.             $this->referenceUserEstablishments[] = $referenceUserEstablishment;
  437.             $referenceUserEstablishment->setUser($this);
  438.         }
  439.         return $this;
  440.     }
  441.     public function removeReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
  442.     {
  443.         if ($this->referenceUserEstablishments->removeElement($referenceUserEstablishment)) {
  444.             // set the owning side to null (unless already changed)
  445.             if ($referenceUserEstablishment->getUser() === $this) {
  446.                 $referenceUserEstablishment->setUser(null);
  447.             }
  448.         }
  449.         return $this;
  450.     }
  451.     /**
  452.      * @return Collection<int, UserEstablishment>
  453.      */
  454.     public function getUserEstablishments(): Collection
  455.     {
  456.         return $this->userEstablishments;
  457.     }
  458.     public function addUserEstablishment(UserEstablishment $userEstablishment): self
  459.     {
  460.         if (!$this->userEstablishments->contains($userEstablishment)) {
  461.             $this->userEstablishments[] = $userEstablishment;
  462.             $userEstablishment->setUser($this);
  463.         }
  464.         return $this;
  465.     }
  466.     public function removeUserEstablishment(UserEstablishment $userEstablishment): self
  467.     {
  468.         if ($this->userEstablishments->removeElement($userEstablishment)) {
  469.             // set the owning side to null (unless already changed)
  470.             if ($userEstablishment->getUser() === $this) {
  471.                 $userEstablishment->setUser(null);
  472.             }
  473.         }
  474.         return $this;
  475.     }
  476.     /**
  477.      * @return Collection<int, ShoppingCart>
  478.      */
  479.     public function getShoppingCarts(): Collection
  480.     {
  481.         return $this->shoppingCarts;
  482.     }
  483.     public function addShoppingCart(ShoppingCart $shoppingCart): self
  484.     {
  485.         if (!$this->shoppingCarts->contains($shoppingCart)) {
  486.             $this->shoppingCarts[] = $shoppingCart;
  487.             $shoppingCart->setCreatedBy($this);
  488.         }
  489.         return $this;
  490.     }
  491.     public function removeShoppingCart(ShoppingCart $shoppingCart): self
  492.     {
  493.         if ($this->shoppingCarts->removeElement($shoppingCart)) {
  494.             // set the owning side to null (unless already changed)
  495.             if ($shoppingCart->getCreatedBy() === $this) {
  496.                 $shoppingCart->setCreatedBy(null);
  497.             }
  498.         }
  499.         return $this;
  500.     }
  501.     /**
  502.      * @return Collection<int, Orders>
  503.      */
  504.     public function getOrdersValidated(): Collection
  505.     {
  506.         return $this->ordersValidated;
  507.     }
  508.     public function addOrdersValidated(Orders $ordersValidated): self
  509.     {
  510.         if (!$this->ordersValidated->contains($ordersValidated)) {
  511.             $this->ordersValidated[] = $ordersValidated;
  512.             $ordersValidated->setValidatedBy($this);
  513.         }
  514.         return $this;
  515.     }
  516.     public function removeOrdersValidated(Orders $ordersValidated): self
  517.     {
  518.         if ($this->ordersValidated->removeElement($ordersValidated)) {
  519.             // set the owning side to null (unless already changed)
  520.             if ($ordersValidated->getValidatedBy() === $this) {
  521.                 $ordersValidated->setValidatedBy(null);
  522.             }
  523.         }
  524.         return $this;
  525.     }
  526.     /**
  527.      * @return Collection<int, OrderArticle>
  528.      */
  529.     public function getCreatedOrderArticle(): Collection
  530.     {
  531.         return $this->createdOrderArticle;
  532.     }
  533.     public function addCreatedOrderArticle(OrderArticle $createdOrderArticle): self
  534.     {
  535.         if (!$this->createdOrderArticle->contains($createdOrderArticle)) {
  536.             $this->createdOrderArticle[] = $createdOrderArticle;
  537.             $createdOrderArticle->setCreatedBy($this);
  538.         }
  539.         return $this;
  540.     }
  541.     public function removeCreatedOrderArticle(OrderArticle $createdOrderArticle): self
  542.     {
  543.         if ($this->createdOrderArticle->removeElement($createdOrderArticle)) {
  544.             // set the owning side to null (unless already changed)
  545.             if ($createdOrderArticle->getCreatedBy() === $this) {
  546.                 $createdOrderArticle->setCreatedBy(null);
  547.             }
  548.         }
  549.         return $this;
  550.     }
  551.     public function eraseCredentials()
  552.     {
  553.     }
  554.     public function getSalt()
  555.     {
  556.         // you *may* need a real salt depending on your encoder
  557.         // see section on salt below
  558.         return null;
  559.     }
  560.     public function getUsername()
  561.     {
  562.         return $this->email;
  563.     }
  564.     public function getRoles()
  565.     {
  566.         $ROLE = [];
  567.         foreach ($this->userEstablishments as $userEstablishment){
  568.             if($userEstablishment->getStatus()){
  569.                 $ROLE[] = 'ROLE_'.$userEstablishment->getStatus()->getDevName();
  570.             }
  571.         }
  572.         if(empty($ROLE)){
  573.             $ROLE = ["ROLE_USER"];
  574.         }
  575.         return $ROLE;
  576.     }
  577.     /** @see \Serializable::serialize() */
  578.     public function serialize()
  579.     {
  580.         return serialize(array(
  581.             $this->id,
  582.             $this->email,
  583.             $this->password,
  584.             // see section on salt below
  585.             // $this->salt,
  586.         ));
  587.     }
  588.     /** @see \Serializable::unserialize() */
  589.     public function unserialize($serialized)
  590.     {
  591.         list(
  592.             $this->id,
  593.             $this->email,
  594.             $this->password,
  595.             // see section on salt below
  596.             // $this->salt
  597.             ) = unserialize($serialized, array('allowed_classes' => false));
  598.     }
  599.     public function getRequestModification(): ?RequestModification
  600.     {
  601.         return $this->requestModification;
  602.     }
  603.     public function setRequestModification(?RequestModification $requestModification): self
  604.     {
  605.         $this->requestModification $requestModification;
  606.         return $this;
  607.     }
  608.     /**
  609.      * @return Collection<int, RequestModification>
  610.      */
  611.     public function getRequestModifications(): Collection
  612.     {
  613.         return $this->requestModifications;
  614.     }
  615.     public function addRequestModification(RequestModification $requestModification): self
  616.     {
  617.         if (!$this->requestModifications->contains($requestModification)) {
  618.             $this->requestModifications[] = $requestModification;
  619.             $requestModification->setCreatedBy($this);
  620.         }
  621.         return $this;
  622.     }
  623.     public function removeRequestModification(RequestModification $requestModification): self
  624.     {
  625.         if ($this->requestModifications->removeElement($requestModification)) {
  626.             // set the owning side to null (unless already changed)
  627.             if ($requestModification->getCreatedBy() === $this) {
  628.                 $requestModification->setCreatedBy(null);
  629.             }
  630.         }
  631.         return $this;
  632.     }
  633.     /**
  634.      * @return Collection<int, RequestModification>
  635.      */
  636.     public function getRequestModificationsResponsable(): Collection
  637.     {
  638.         return $this->requestModificationsResponsable;
  639.     }
  640.     public function addRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
  641.     {
  642.         if (!$this->requestModificationsResponsable->contains($requestModificationsResponsable)) {
  643.             $this->requestModificationsResponsable[] = $requestModificationsResponsable;
  644.             $requestModificationsResponsable->setResponsable($this);
  645.         }
  646.         return $this;
  647.     }
  648.     public function removeRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
  649.     {
  650.         if ($this->requestModificationsResponsable->removeElement($requestModificationsResponsable)) {
  651.             // set the owning side to null (unless already changed)
  652.             if ($requestModificationsResponsable->getResponsable() === $this) {
  653.                 $requestModificationsResponsable->setResponsable(null);
  654.             }
  655.         }
  656.         return $this;
  657.     }
  658.     /**
  659.      * @return Collection<int, Establishments>
  660.      */
  661.     public function getEstablishments(): Collection
  662.     {
  663.         return $this->establishments;
  664.     }
  665.     public function addEstablishment(Establishments $establishment): self
  666.     {
  667.         if (!$this->establishments->contains($establishment)) {
  668.             $this->establishments[] = $establishment;
  669.             $establishment->setResponsable($this);
  670.         }
  671.         return $this;
  672.     }
  673.     public function removeEstablishment(Establishments $establishment): self
  674.     {
  675.         if ($this->establishments->removeElement($establishment)) {
  676.             // set the owning side to null (unless already changed)
  677.             if ($establishment->getResponsable() === $this) {
  678.                 $establishment->setResponsable(null);
  679.             }
  680.         }
  681.         return $this;
  682.     }
  683.     public function getMyResponsable(): ?self
  684.     {
  685.         return $this->myResponsable;
  686.     }
  687.     public function setMyResponsable(?self $myResponsable): self
  688.     {
  689.         $this->myResponsable $myResponsable;
  690.         return $this;
  691.     }
  692.     /**
  693.      * @return Collection<int, self>
  694.      */
  695.     public function getMyCustomers(): Collection
  696.     {
  697.         return $this->myCustomers;
  698.     }
  699.     public function addMyCustomer(self $myCustomer): self
  700.     {
  701.         if (!$this->myCustomers->contains($myCustomer)) {
  702.             $this->myCustomers[] = $myCustomer;
  703.             $myCustomer->setMyResponsable($this);
  704.         }
  705.         return $this;
  706.     }
  707.     public function removeMyCustomer(self $myCustomer): self
  708.     {
  709.         if ($this->myCustomers->removeElement($myCustomer)) {
  710.             // set the owning side to null (unless already changed)
  711.             if ($myCustomer->getMyResponsable() === $this) {
  712.                 $myCustomer->setMyResponsable(null);
  713.             }
  714.         }
  715.         return $this;
  716.     }
  717.     public function isNotPresent(): ?bool
  718.     {
  719.         return $this->notPresent;
  720.     }
  721.     public function setNotPresent(bool $notPresent): self
  722.     {
  723.         $this->notPresent $notPresent;
  724.         return $this;
  725.     }
  726.     public function getCity(): ?string
  727.     {
  728.         return $this->city;
  729.     }
  730.     public function setCity(string $city): self
  731.     {
  732.         $this->city $city;
  733.         return $this;
  734.     }
  735.     public function getZip(): ?string
  736.     {
  737.         return $this->zip;
  738.     }
  739.     public function setZip(string $zip): self
  740.     {
  741.         $this->zip $zip;
  742.         return $this;
  743.     }
  744.     public function getNumberPhone(): ?string
  745.     {
  746.         return $this->numberPhone;
  747.     }
  748.     public function setNumberPhone(string $numberPhone): self
  749.     {
  750.         $this->numberPhone $numberPhone;
  751.         return $this;
  752.     }
  753.     /**
  754.      * @return Collection<int, Orders>
  755.      */
  756.     public function getOrders(): Collection
  757.     {
  758.         return $this->orders;
  759.     }
  760.     public function addOrder(Orders $order): self
  761.     {
  762.         if (!$this->orders->contains($order)) {
  763.             $this->orders[] = $order;
  764.             $order->setUser($this);
  765.         }
  766.         return $this;
  767.     }
  768.     public function removeOrder(Orders $order): self
  769.     {
  770.         if ($this->orders->removeElement($order)) {
  771.             // set the owning side to null (unless already changed)
  772.             if ($order->getUser() === $this) {
  773.                 $order->setUser(null);
  774.             }
  775.         }
  776.         return $this;
  777.     }
  778.     public function getPoints(): ?float
  779.     {
  780.         return $this->points;
  781.     }
  782.     public function setPoints(?float $points): self
  783.     {
  784.         $this->points $points;
  785.         return $this;
  786.     }
  787.     /**
  788.      * @return Collection<int, ShoppingCart>
  789.      */
  790.     public function getShoppingCartsUsers(): Collection
  791.     {
  792.         return $this->shoppingCartsUsers;
  793.     }
  794.     public function addShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
  795.     {
  796.         if (!$this->shoppingCartsUsers->contains($shoppingCartsUser)) {
  797.             $this->shoppingCartsUsers[] = $shoppingCartsUser;
  798.             $shoppingCartsUser->setUser($this);
  799.         }
  800.         return $this;
  801.     }
  802.     public function removeShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
  803.     {
  804.         if ($this->shoppingCartsUsers->removeElement($shoppingCartsUser)) {
  805.             // set the owning side to null (unless already changed)
  806.             if ($shoppingCartsUser->getUser() === $this) {
  807.                 $shoppingCartsUser->setUser(null);
  808.             }
  809.         }
  810.         return $this;
  811.     }
  812.     /**
  813.      * @return Collection<int, ShoppingCart>
  814.      */
  815.     public function getShppingCartsUpdatedBy(): Collection
  816.     {
  817.         return $this->shppingCartsUpdatedBy;
  818.     }
  819.     public function addShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
  820.     {
  821.         if (!$this->shppingCartsUpdatedBy->contains($shppingCartsUpdatedBy)) {
  822.             $this->shppingCartsUpdatedBy[] = $shppingCartsUpdatedBy;
  823.             $shppingCartsUpdatedBy->setUpdatedBy($this);
  824.         }
  825.         return $this;
  826.     }
  827.     public function removeShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
  828.     {
  829.         if ($this->shppingCartsUpdatedBy->removeElement($shppingCartsUpdatedBy)) {
  830.             // set the owning side to null (unless already changed)
  831.             if ($shppingCartsUpdatedBy->getUpdatedBy() === $this) {
  832.                 $shppingCartsUpdatedBy->setUpdatedBy(null);
  833.             }
  834.         }
  835.         return $this;
  836.     }
  837.     public function getClientCard(): ?string
  838.     {
  839.         return $this->clientCard;
  840.     }
  841.     public function setClientCard(?string $clientCard): self
  842.     {
  843.         $this->clientCard $clientCard;
  844.         return $this;
  845.     }
  846.     public function isCgvAccepted(): ?bool
  847.     {
  848.         return $this->cgvAccepted;
  849.     }
  850.     public function setCgvAccepted(bool $cgvAccepted): self
  851.     {
  852.         $this->cgvAccepted $cgvAccepted;
  853.         return $this;
  854.     }
  855.     /**
  856.      * @return Collection<int, Orders>
  857.      */
  858.     public function getLastPickupUpdateOrder(): Collection
  859.     {
  860.         return $this->lastPickupUpdateOrder;
  861.     }
  862.     public function addLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
  863.     {
  864.         if (!$this->lastPickupUpdateOrder->contains($lastPickupUpdateOrder)) {
  865.             $this->lastPickupUpdateOrder[] = $lastPickupUpdateOrder;
  866.             $lastPickupUpdateOrder->setLastPickupUpdateBy($this);
  867.         }
  868.         return $this;
  869.     }
  870.     public function removeLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
  871.     {
  872.         if ($this->lastPickupUpdateOrder->removeElement($lastPickupUpdateOrder)) {
  873.             // set the owning side to null (unless already changed)
  874.             if ($lastPickupUpdateOrder->getLastPickupUpdateBy() === $this) {
  875.                 $lastPickupUpdateOrder->setLastPickupUpdateBy(null);
  876.             }
  877.         }
  878.         return $this;
  879.     }
  880.     public function getGenre(): ?string
  881.     {
  882.         return $this->genre;
  883.     }
  884.     public function setGenre(?string $genre): self
  885.     {
  886.         $this->genre $genre;
  887.         return $this;
  888.     }
  889.     public function getAddress(): ?string
  890.     {
  891.         return $this->address;
  892.     }
  893.     public function setAddress(?string $address): self
  894.     {
  895.         $this->address $address;
  896.         return $this;
  897.     }
  898.     public function getTvaNumber(): ?string
  899.     {
  900.         return $this->TvaNumber;
  901.     }
  902.     public function setTvaNumber(?string $TvaNumber): self
  903.     {
  904.         $this->TvaNumber $TvaNumber;
  905.         return $this;
  906.     }
  907.     public function getNewPasswordCode(): ?int
  908.     {
  909.         return $this->newPasswordCode;
  910.     }
  911.     public function setNewPasswordCode(?int $newPasswordCode): self
  912.     {
  913.         $this->newPasswordCode $newPasswordCode;
  914.         return $this;
  915.     }
  916. public function isEmailValidated(): ?bool
  917.     {
  918.         return $this->emailValidated;
  919.     }
  920.     public function setEmailValidated(bool $emailValidated): self
  921.     {
  922.         $this->emailValidated $emailValidated;
  923.         return $this;
  924.     }
  925.     public function getNewPasswordCreatedAt(): ?\DateTimeInterface
  926.     {
  927.         return $this->newPasswordCreatedAt;
  928.     }
  929.     public function setNewPasswordCreatedAt(?\DateTimeInterface $newPasswordCreatedAt): self
  930.     {
  931.         $this->newPasswordCreatedAt $newPasswordCreatedAt;
  932.         return $this;
  933.     }
  934.     public function getEmailValidationToken(): ?string
  935.     {
  936.         return $this->emailValidationToken;
  937.     }
  938.     public function setEmailValidationToken(?string $emailValidationToken): self
  939.     {
  940.         $this->emailValidationToken $emailValidationToken;
  941.         return $this;
  942.     }
  943.     /**
  944.      * @return Collection<int, Favorite>
  945.      */
  946.     public function getFavorites(): Collection
  947.     {
  948.         return $this->favorites;
  949.     }
  950.     public function addFavorite(Favorite $favorite): self
  951.     {
  952.         if (!$this->favorites->contains($favorite)) {
  953.             $this->favorites[] = $favorite;
  954.             $favorite->setUser($this);
  955.         }
  956.         return $this;
  957.     }
  958.     public function removeFavorite(Favorite $favorite): self
  959.     {
  960.         if ($this->favorites->removeElement($favorite)) {
  961.             // set the owning side to null (unless already changed)
  962.             if ($favorite->getUser() === $this) {
  963.                 $favorite->setUser(null);
  964.             }
  965.         }
  966.         return $this;
  967.     }
  968.     public function getNewPasswordToken(): ?string
  969.     {
  970.         return $this->newPasswordToken;
  971.     }
  972.     public function setNewPasswordToken(?string $newPasswordToken): self
  973.     {
  974.         $this->newPasswordToken $newPasswordToken;
  975.         return $this;
  976.     }
  977.     public function getStatusIntern(): ?userStatusIntern
  978.     {
  979.         return $this->statusIntern;
  980.     }
  981.     public function setStatusIntern(?userStatusIntern $statusIntern): self
  982.     {
  983.         $this->statusIntern $statusIntern;
  984.         return $this;
  985.     }
  986.     /**
  987.      * @return Collection<int, Banner>
  988.      */
  989.     public function getBanners(): Collection
  990.     {
  991.         return $this->banners;
  992.     }
  993.     public function addBanner(Banner $banner): self
  994.     {
  995.         if (!$this->banners->contains($banner)) {
  996.             $this->banners[] = $banner;
  997.             $banner->setCreatedBy($this);
  998.         }
  999.         return $this;
  1000.     }
  1001.     public function removeBanner(Banner $banner): self
  1002.     {
  1003.         if ($this->banners->removeElement($banner)) {
  1004.             // set the owning side to null (unless already changed)
  1005.             if ($banner->getCreatedBy() === $this) {
  1006.                 $banner->setCreatedBy(null);
  1007.             }
  1008.         }
  1009.         return $this;
  1010.     }
  1011.     public function getTva(): ?TVA
  1012.     {
  1013.         return $this->tva;
  1014.     }
  1015.     public function setTva(?TVA $tva): self
  1016.     {
  1017.         $this->tva $tva;
  1018.         return $this;
  1019.     }
  1020.     public function isFirstConnexion(): ?bool
  1021.     {
  1022.         return $this->firstConnexion;
  1023.     }
  1024.     public function setFirstConnexion(bool $firstConnexion): self
  1025.     {
  1026.         $this->firstConnexion $firstConnexion;
  1027.         return $this;
  1028.     }
  1029.     /**
  1030.      * @return Collection<int, Invoice>
  1031.      */
  1032.     public function getInvoices(): Collection
  1033.     {
  1034.         return $this->invoices;
  1035.     }
  1036.     public function addInvoice(Invoice $invoice): self
  1037.     {
  1038.         if (!$this->invoices->contains($invoice)) {
  1039.             $this->invoices[] = $invoice;
  1040.             $invoice->setUser($this);
  1041.         }
  1042.         return $this;
  1043.     }
  1044.     public function removeInvoice(Invoice $invoice): self
  1045.     {
  1046.         if ($this->invoices->removeElement($invoice)) {
  1047.             // set the owning side to null (unless already changed)
  1048.             if ($invoice->getUser() === $this) {
  1049.                 $invoice->setUser(null);
  1050.             }
  1051.         }
  1052.         return $this;
  1053.     }
  1054.     /**
  1055.      * @return Collection<int, EmailInvoice>
  1056.      */
  1057.     public function getEmailInvoices(): Collection
  1058.     {
  1059.         return $this->emailInvoices;
  1060.     }
  1061.     public function addEmailInvoice(EmailInvoice $emailInvoice): self
  1062.     {
  1063.         if (!$this->emailInvoices->contains($emailInvoice)) {
  1064.             $this->emailInvoices[] = $emailInvoice;
  1065.             $emailInvoice->setAddedBy($this);
  1066.         }
  1067.         return $this;
  1068.     }
  1069.     public function removeEmailInvoice(EmailInvoice $emailInvoice): self
  1070.     {
  1071.         if ($this->emailInvoices->removeElement($emailInvoice)) {
  1072.             // set the owning side to null (unless already changed)
  1073.             if ($emailInvoice->getAddedBy() === $this) {
  1074.                 $emailInvoice->setAddedBy(null);
  1075.             }
  1076.         }
  1077.         return $this;
  1078.     }
  1079.     /**
  1080.      * @return Collection<int, ArticleOrderOutOfStock>
  1081.      */
  1082.     public function getArticleOrderOutOfStocks(): Collection
  1083.     {
  1084.         return $this->articleOrderOutOfStocks;
  1085.     }
  1086.     public function addArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
  1087.     {
  1088.         if (!$this->articleOrderOutOfStocks->contains($articleOrderOutOfStock)) {
  1089.             $this->articleOrderOutOfStocks[] = $articleOrderOutOfStock;
  1090.             $articleOrderOutOfStock->setUser($this);
  1091.         }
  1092.         return $this;
  1093.     }
  1094.     public function removeArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
  1095.     {
  1096.         if ($this->articleOrderOutOfStocks->removeElement($articleOrderOutOfStock)) {
  1097.             // set the owning side to null (unless already changed)
  1098.             if ($articleOrderOutOfStock->getUser() === $this) {
  1099.                 $articleOrderOutOfStock->setUser(null);
  1100.             }
  1101.         }
  1102.         return $this;
  1103.     }
  1104.     /**
  1105.      * @return Collection<int, BackOrder>
  1106.      */
  1107.     public function getBackOrders(): Collection
  1108.     {
  1109.         return $this->backOrders;
  1110.     }
  1111.     public function addBackOrder(BackOrder $backOrder): self
  1112.     {
  1113.         if (!$this->backOrders->contains($backOrder)) {
  1114.             $this->backOrders[] = $backOrder;
  1115.             $backOrder->setUser($this);
  1116.         }
  1117.         return $this;
  1118.     }
  1119.     public function removeBackOrder(BackOrder $backOrder): self
  1120.     {
  1121.         if ($this->backOrders->removeElement($backOrder)) {
  1122.             // set the owning side to null (unless already changed)
  1123.             if ($backOrder->getUser() === $this) {
  1124.                 $backOrder->setUser(null);
  1125.             }
  1126.         }
  1127.         return $this;
  1128.     }
  1129.     /**
  1130.      * @return Collection<int, InvoiceDownloads>
  1131.      */
  1132.     public function getInvoiceDownloads(): Collection
  1133.     {
  1134.         return $this->invoiceDownloads;
  1135.     }
  1136.     public function addInvoiceDownload(InvoiceDownloads $invoiceDownload): self
  1137.     {
  1138.         if (!$this->invoiceDownloads->contains($invoiceDownload)) {
  1139.             $this->invoiceDownloads[] = $invoiceDownload;
  1140.             $invoiceDownload->setUser($this);
  1141.         }
  1142.         return $this;
  1143.     }
  1144.     public function removeInvoiceDownload(InvoiceDownloads $invoiceDownload): self
  1145.     {
  1146.         if ($this->invoiceDownloads->removeElement($invoiceDownload)) {
  1147.             // set the owning side to null (unless already changed)
  1148.             if ($invoiceDownload->getUser() === $this) {
  1149.                 $invoiceDownload->setUser(null);
  1150.             }
  1151.         }
  1152.         return $this;
  1153.     }
  1154.     /**
  1155.      * @return Collection<int, Articles>
  1156.      */
  1157.     public function getArticlesChangeVisibility(): Collection
  1158.     {
  1159.         return $this->articlesChangeVisibility;
  1160.     }
  1161.     public function addArticlesChangeVisibility(Articles $article): self
  1162.     {
  1163.         if (!$this->articlesChangeVisibility->contains($article)) {
  1164.             $this->articlesChangeVisibility[] = $article;
  1165.             $article->setVisibleBy($this);
  1166.         }
  1167.         return $this;
  1168.     }
  1169.     public function removeArticlesChangeVisibility(Articles $article): self
  1170.     {
  1171.         if ($this->articlesChangeVisibility->removeElement($article)) {
  1172.             // set the owning side to null (unless already changed)
  1173.             if ($article->getVisibleBy() === $this) {
  1174.                 $article->setVisibleBy(null);
  1175.             }
  1176.         }
  1177.         return $this;
  1178.     }
  1179.     /**
  1180.      * @return Collection<int, ChildTags>
  1181.      */
  1182.     public function getChildTagsUpdate(): Collection
  1183.     {
  1184.         return $this->childTagsUpdate;
  1185.     }
  1186.     public function addChildTagsUpdate(ChildTags $childTagsUpdate): self
  1187.     {
  1188.         if (!$this->childTagsUpdate->contains($childTagsUpdate)) {
  1189.             $this->childTagsUpdate[] = $childTagsUpdate;
  1190.             $childTagsUpdate->setUpdatedBy($this);
  1191.         }
  1192.         return $this;
  1193.     }
  1194.     public function removeChildTagsUpdate(ChildTags $childTagsUpdate): self
  1195.     {
  1196.         if ($this->childTagsUpdate->removeElement($childTagsUpdate)) {
  1197.             // set the owning side to null (unless already changed)
  1198.             if ($childTagsUpdate->getUpdatedBy() === $this) {
  1199.                 $childTagsUpdate->setUpdatedBy(null);
  1200.             }
  1201.         }
  1202.         return $this;
  1203.     }
  1204.     /**
  1205.      * @return Collection<int, TagGroups>
  1206.      */
  1207.     public function getTagGroupsUpdate(): Collection
  1208.     {
  1209.         return $this->TagGroupsUpdate;
  1210.     }
  1211.     public function addTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
  1212.     {
  1213.         if (!$this->tagGroupsUpdate->contains($tagGroupsUpdate)) {
  1214.             $this->tagGroupsUpdate[] = $tagGroupsUpdate;
  1215.             $tagGroupsUpdate->setUpdatedBy($this);
  1216.         }
  1217.         return $this;
  1218.     }
  1219.     public function removeTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
  1220.     {
  1221.         if ($this->tagGroupsUpdate->removeElement($tagGroupsUpdate)) {
  1222.             // set the owning side to null (unless already changed)
  1223.             if ($tagGroupsUpdate->getUpdatedBy() === $this) {
  1224.                 $tagGroupsUpdate->setUpdatedBy(null);
  1225.             }
  1226.         }
  1227.         return $this;
  1228.     }
  1229.     /**
  1230.      * @return Collection<int, Feedback>
  1231.      */
  1232.     public function getFeedback(): Collection
  1233.     {
  1234.         return $this->feedback;
  1235.     }
  1236.     public function addFeedback(Feedback $feedback): self
  1237.     {
  1238.         if (!$this->feedback->contains($feedback)) {
  1239.             $this->feedback[] = $feedback;
  1240.             $feedback->setUser($this);
  1241.         }
  1242.         return $this;
  1243.     }
  1244.     public function removeFeedback(Feedback $feedback): self
  1245.     {
  1246.         if ($this->feedback->removeElement($feedback)) {
  1247.             // set the owning side to null (unless already changed)
  1248.             if ($feedback->getUser() === $this) {
  1249.                 $feedback->setUser(null);
  1250.             }
  1251.         }
  1252.         return $this;
  1253.     }
  1254.     public function getDeletedAt(): ?\DateTimeInterface
  1255.     {
  1256.         return $this->deletedAt;
  1257.     }
  1258.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  1259.     {
  1260.         $this->deletedAt $deletedAt;
  1261.         return $this;
  1262.     }
  1263.     public function getDeletedBy(): ?self
  1264.     {
  1265.         return $this->deletedBy;
  1266.     }
  1267.     public function setDeletedBy(?self $deletedBy): self
  1268.     {
  1269.         $this->deletedBy $deletedBy;
  1270.         return $this;
  1271.     }
  1272.     public function getZendeskId(): ?string
  1273.     {
  1274.         return $this->zendeskId;
  1275.     }
  1276.     public function setZendeskId(?string $zendeskId): self
  1277.     {
  1278.         $this->zendeskId $zendeskId;
  1279.         return $this;
  1280.     }
  1281.     public function getConnectedAt(): ?Establishments
  1282.     {
  1283.         return $this->connectedAt;
  1284.     }
  1285.     public function setConnectedAt(?Establishments $connectedAt): self
  1286.     {
  1287.         $this->connectedAt $connectedAt;
  1288.         return $this;
  1289.     }
  1290.     /**
  1291.      * @return Collection<int, ListRestriction>
  1292.      */
  1293.     public function getListRestrictions(): Collection
  1294.     {
  1295.         return $this->listRestrictions;
  1296.     }
  1297.     public function addListRestriction(ListRestriction $listRestriction): self
  1298.     {
  1299.         if (!$this->listRestrictions->contains($listRestriction)) {
  1300.             $this->listRestrictions[] = $listRestriction;
  1301.             $listRestriction->setCreatedBy($this);
  1302.         }
  1303.         return $this;
  1304.     }
  1305.     public function removeListRestriction(ListRestriction $listRestriction): self
  1306.     {
  1307.         if ($this->listRestrictions->removeElement($listRestriction)) {
  1308.             // set the owning side to null (unless already changed)
  1309.             if ($listRestriction->getCreatedBy() === $this) {
  1310.                 $listRestriction->setCreatedBy(null);
  1311.             }
  1312.         }
  1313.         return $this;
  1314.     }
  1315.     /**
  1316.      * @return Collection<int, ListRestrictionEstablishment>
  1317.      */
  1318.     public function getGetListRestrictionEstablishmentsCreatedBy(): Collection
  1319.     {
  1320.         return $this->getListRestrictionEstablishmentsCreatedBy;
  1321.     }
  1322.     public function addGetListRestrictionEstablishmentsCreatedBy(ListRestrictionEstablishment $getListRestrictionEstablishmentsCreatedBy): self
  1323.     {
  1324.         if (!$this->getListRestrictionEstablishmentsCreatedBy->contains($getListRestrictionEstablishmentsCreatedBy)) {
  1325.             $this->getListRestrictionEstablishmentsCreatedBy[] = $getListRestrictionEstablishmentsCreatedBy;
  1326.             $getListRestrictionEstablishmentsCreatedBy->setCreatedBy($this);
  1327.         }
  1328.         return $this;
  1329.     }
  1330.     public function removeGetListRestrictionEstablishmentsCreatedBy(ListRestrictionEstablishment $getListRestrictionEstablishmentsCreatedBy): self
  1331.     {
  1332.         if ($this->getListRestrictionEstablishmentsCreatedBy->removeElement($getListRestrictionEstablishmentsCreatedBy)) {
  1333.             // set the owning side to null (unless already changed)
  1334.             if ($getListRestrictionEstablishmentsCreatedBy->getCreatedBy() === $this) {
  1335.                 $getListRestrictionEstablishmentsCreatedBy->setCreatedBy(null);
  1336.             }
  1337.         }
  1338.         return $this;
  1339.     }
  1340. }