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.     public function __construct()
  252.     {
  253.         $this->createdAt = new \DateTime();
  254.         $this->numberOfCardCustomers = new ArrayCollection();
  255.         $this->typeEstablishments = new ArrayCollection();
  256.         $this->referenceUserEstablishments = new ArrayCollection();
  257.         $this->userEstablishments = new ArrayCollection();
  258.         $this->shoppingCarts = new ArrayCollection();
  259.         $this->ordersValidated = new ArrayCollection();
  260.         $this->createdOrderArticle = new ArrayCollection();
  261.         $this->requestModifications = new ArrayCollection();
  262.         $this->requestModificationsResponsable = new ArrayCollection();
  263.         $this->establishments = new ArrayCollection();
  264.         $this->myCustomers = new ArrayCollection();
  265.         $this->orders = new ArrayCollection();
  266.         $this->shoppingCartsUsers = new ArrayCollection();
  267.         $this->shppingCartsUpdatedBy = new ArrayCollection();
  268.         $this->lastPickupUpdateOrder = new ArrayCollection();
  269.         $this->favorites = new ArrayCollection();
  270.         $this->banners = new ArrayCollection();
  271.         $this->invoices = new ArrayCollection();
  272.         $this->emailInvoices = new ArrayCollection();
  273.         $this->articleOrderOutOfStocks = new ArrayCollection();
  274.         $this->backOrders = new ArrayCollection();
  275.         $this->invoiceDownloads = new ArrayCollection();
  276.         $this->articlesChangeVisibility = new ArrayCollection();
  277.         $this->childTagsUpdate = new ArrayCollection();
  278.         $this->tagGroupsUpdate = new ArrayCollection();
  279.         $this->feedback = new ArrayCollection();
  280.     }
  281.     public function getId(): ?int
  282.     {
  283.         return $this->id;
  284.     }
  285.     public function getPassword(): ?string
  286.     {
  287.         return $this->password;
  288.     }
  289.     public function setPassword(string $password): self
  290.     {
  291.         $this->password $password;
  292.         return $this;
  293.     }
  294.     public function getIdPunch(): ?int
  295.     {
  296.         return $this->idPunch;
  297.     }
  298.     public function setIdPunch(?int $idPunch): self
  299.     {
  300.         $this->idPunch $idPunch;
  301.         return $this;
  302.     }
  303.     public function getFirstname(): ?string
  304.     {
  305.         return $this->firstname;
  306.     }
  307.     public function setFirstname(?string $firstname): self
  308.     {
  309.         $this->firstname $firstname;
  310.         return $this;
  311.     }
  312.     public function getLastname(): ?string
  313.     {
  314.         return $this->lastname;
  315.     }
  316.     public function setLastname(?string $lastname): self
  317.     {
  318.         $this->lastname $lastname;
  319.         return $this;
  320.     }
  321.     public function getEmail(): ?string
  322.     {
  323.         return $this->email;
  324.     }
  325.     public function setEmail(?string $email): self
  326.     {
  327.         $this->email $email;
  328.         return $this;
  329.     }
  330.     public function getCreatedAt(): ?\DateTimeInterface
  331.     {
  332.         return $this->createdAt;
  333.     }
  334.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  335.     {
  336.         $this->createdAt $createdAt;
  337.         return $this;
  338.     }
  339.     public function isDeleted(): ?bool
  340.     {
  341.         return $this->deleted;
  342.     }
  343.     public function setDeleted(bool $deleted): self
  344.     {
  345.         $this->deleted $deleted;
  346.         return $this;
  347.     }
  348.     public function getToken(): ?string
  349.     {
  350.         return $this->token;
  351.     }
  352.     public function setToken(?string $token): self
  353.     {
  354.         $this->token $token;
  355.         return $this;
  356.     }
  357.     public function isValidated(): ?bool
  358.     {
  359.         return $this->validated;
  360.     }
  361.     public function setValidated(bool $validated): self
  362.     {
  363.         $this->validated $validated;
  364.         return $this;
  365.     }
  366.     /**
  367.      * @return Collection<int, NumberOfCardCustomer>
  368.      */
  369.     public function getNumberOfCardCustomers(): Collection
  370.     {
  371.         return $this->numberOfCardCustomers;
  372.     }
  373.     public function addNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
  374.     {
  375.         if (!$this->numberOfCardCustomers->contains($numberOfCardCustomer)) {
  376.             $this->numberOfCardCustomers[] = $numberOfCardCustomer;
  377.             $numberOfCardCustomer->setCustomer($this);
  378.         }
  379.         return $this;
  380.     }
  381.     public function removeNumberOfCardCustomer(NumberOfCardCustomer $numberOfCardCustomer): self
  382.     {
  383.         if ($this->numberOfCardCustomers->removeElement($numberOfCardCustomer)) {
  384.             // set the owning side to null (unless already changed)
  385.             if ($numberOfCardCustomer->getCustomer() === $this) {
  386.                 $numberOfCardCustomer->setCustomer(null);
  387.             }
  388.         }
  389.         return $this;
  390.     }
  391.     /**
  392.      * @return Collection<int, TypeEstablishment>
  393.      */
  394.     public function getTypeEstablishments(): Collection
  395.     {
  396.         return $this->typeEstablishments;
  397.     }
  398.     public function addTypeEstablishment(TypeEstablishment $typeEstablishment): self
  399.     {
  400.         if (!$this->typeEstablishments->contains($typeEstablishment)) {
  401.             $this->typeEstablishments[] = $typeEstablishment;
  402.             $typeEstablishment->setCreatedBy($this);
  403.         }
  404.         return $this;
  405.     }
  406.     public function removeTypeEstablishment(TypeEstablishment $typeEstablishment): self
  407.     {
  408.         if ($this->typeEstablishments->removeElement($typeEstablishment)) {
  409.             // set the owning side to null (unless already changed)
  410.             if ($typeEstablishment->getCreatedBy() === $this) {
  411.                 $typeEstablishment->setCreatedBy(null);
  412.             }
  413.         }
  414.         return $this;
  415.     }
  416.     /**
  417.      * @return Collection<int, ReferenceUserEstablishment>
  418.      */
  419.     public function getReferenceUserEstablishments(): Collection
  420.     {
  421.         return $this->referenceUserEstablishments;
  422.     }
  423.     public function addReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
  424.     {
  425.         if (!$this->referenceUserEstablishments->contains($referenceUserEstablishment)) {
  426.             $this->referenceUserEstablishments[] = $referenceUserEstablishment;
  427.             $referenceUserEstablishment->setUser($this);
  428.         }
  429.         return $this;
  430.     }
  431.     public function removeReferenceUserEstablishment(ReferenceUserEstablishment $referenceUserEstablishment): self
  432.     {
  433.         if ($this->referenceUserEstablishments->removeElement($referenceUserEstablishment)) {
  434.             // set the owning side to null (unless already changed)
  435.             if ($referenceUserEstablishment->getUser() === $this) {
  436.                 $referenceUserEstablishment->setUser(null);
  437.             }
  438.         }
  439.         return $this;
  440.     }
  441.     /**
  442.      * @return Collection<int, UserEstablishment>
  443.      */
  444.     public function getUserEstablishments(): Collection
  445.     {
  446.         return $this->userEstablishments;
  447.     }
  448.     public function addUserEstablishment(UserEstablishment $userEstablishment): self
  449.     {
  450.         if (!$this->userEstablishments->contains($userEstablishment)) {
  451.             $this->userEstablishments[] = $userEstablishment;
  452.             $userEstablishment->setUser($this);
  453.         }
  454.         return $this;
  455.     }
  456.     public function removeUserEstablishment(UserEstablishment $userEstablishment): self
  457.     {
  458.         if ($this->userEstablishments->removeElement($userEstablishment)) {
  459.             // set the owning side to null (unless already changed)
  460.             if ($userEstablishment->getUser() === $this) {
  461.                 $userEstablishment->setUser(null);
  462.             }
  463.         }
  464.         return $this;
  465.     }
  466.     /**
  467.      * @return Collection<int, ShoppingCart>
  468.      */
  469.     public function getShoppingCarts(): Collection
  470.     {
  471.         return $this->shoppingCarts;
  472.     }
  473.     public function addShoppingCart(ShoppingCart $shoppingCart): self
  474.     {
  475.         if (!$this->shoppingCarts->contains($shoppingCart)) {
  476.             $this->shoppingCarts[] = $shoppingCart;
  477.             $shoppingCart->setCreatedBy($this);
  478.         }
  479.         return $this;
  480.     }
  481.     public function removeShoppingCart(ShoppingCart $shoppingCart): self
  482.     {
  483.         if ($this->shoppingCarts->removeElement($shoppingCart)) {
  484.             // set the owning side to null (unless already changed)
  485.             if ($shoppingCart->getCreatedBy() === $this) {
  486.                 $shoppingCart->setCreatedBy(null);
  487.             }
  488.         }
  489.         return $this;
  490.     }
  491.     /**
  492.      * @return Collection<int, Orders>
  493.      */
  494.     public function getOrdersValidated(): Collection
  495.     {
  496.         return $this->ordersValidated;
  497.     }
  498.     public function addOrdersValidated(Orders $ordersValidated): self
  499.     {
  500.         if (!$this->ordersValidated->contains($ordersValidated)) {
  501.             $this->ordersValidated[] = $ordersValidated;
  502.             $ordersValidated->setValidatedBy($this);
  503.         }
  504.         return $this;
  505.     }
  506.     public function removeOrdersValidated(Orders $ordersValidated): self
  507.     {
  508.         if ($this->ordersValidated->removeElement($ordersValidated)) {
  509.             // set the owning side to null (unless already changed)
  510.             if ($ordersValidated->getValidatedBy() === $this) {
  511.                 $ordersValidated->setValidatedBy(null);
  512.             }
  513.         }
  514.         return $this;
  515.     }
  516.     /**
  517.      * @return Collection<int, OrderArticle>
  518.      */
  519.     public function getCreatedOrderArticle(): Collection
  520.     {
  521.         return $this->createdOrderArticle;
  522.     }
  523.     public function addCreatedOrderArticle(OrderArticle $createdOrderArticle): self
  524.     {
  525.         if (!$this->createdOrderArticle->contains($createdOrderArticle)) {
  526.             $this->createdOrderArticle[] = $createdOrderArticle;
  527.             $createdOrderArticle->setCreatedBy($this);
  528.         }
  529.         return $this;
  530.     }
  531.     public function removeCreatedOrderArticle(OrderArticle $createdOrderArticle): self
  532.     {
  533.         if ($this->createdOrderArticle->removeElement($createdOrderArticle)) {
  534.             // set the owning side to null (unless already changed)
  535.             if ($createdOrderArticle->getCreatedBy() === $this) {
  536.                 $createdOrderArticle->setCreatedBy(null);
  537.             }
  538.         }
  539.         return $this;
  540.     }
  541.     public function eraseCredentials()
  542.     {
  543.     }
  544.     public function getSalt()
  545.     {
  546.         // you *may* need a real salt depending on your encoder
  547.         // see section on salt below
  548.         return null;
  549.     }
  550.     public function getUsername()
  551.     {
  552.         return $this->email;
  553.     }
  554.     public function getRoles()
  555.     {
  556.         $ROLE = ["ROLE_USER"];
  557.         foreach ($this->userEstablishments as $userEstablishment){
  558.             if($userEstablishment->getStatus()){
  559.                 if ($userEstablishment->getStatus()->getDevName() === "ACCESS_WEB"){
  560.                     $ROLE[] = 'ROLE_ACCESS_WEB';
  561.                 }
  562.             }
  563.         }
  564.         return $ROLE;
  565.     }
  566.     /** @see \Serializable::serialize() */
  567.     public function serialize()
  568.     {
  569.         return serialize(array(
  570.             $this->id,
  571.             $this->email,
  572.             $this->password,
  573.             // see section on salt below
  574.             // $this->salt,
  575.         ));
  576.     }
  577.     /** @see \Serializable::unserialize() */
  578.     public function unserialize($serialized)
  579.     {
  580.         list(
  581.             $this->id,
  582.             $this->email,
  583.             $this->password,
  584.             // see section on salt below
  585.             // $this->salt
  586.             ) = unserialize($serialized, array('allowed_classes' => false));
  587.     }
  588.     public function getRequestModification(): ?RequestModification
  589.     {
  590.         return $this->requestModification;
  591.     }
  592.     public function setRequestModification(?RequestModification $requestModification): self
  593.     {
  594.         $this->requestModification $requestModification;
  595.         return $this;
  596.     }
  597.     /**
  598.      * @return Collection<int, RequestModification>
  599.      */
  600.     public function getRequestModifications(): Collection
  601.     {
  602.         return $this->requestModifications;
  603.     }
  604.     public function addRequestModification(RequestModification $requestModification): self
  605.     {
  606.         if (!$this->requestModifications->contains($requestModification)) {
  607.             $this->requestModifications[] = $requestModification;
  608.             $requestModification->setCreatedBy($this);
  609.         }
  610.         return $this;
  611.     }
  612.     public function removeRequestModification(RequestModification $requestModification): self
  613.     {
  614.         if ($this->requestModifications->removeElement($requestModification)) {
  615.             // set the owning side to null (unless already changed)
  616.             if ($requestModification->getCreatedBy() === $this) {
  617.                 $requestModification->setCreatedBy(null);
  618.             }
  619.         }
  620.         return $this;
  621.     }
  622.     /**
  623.      * @return Collection<int, RequestModification>
  624.      */
  625.     public function getRequestModificationsResponsable(): Collection
  626.     {
  627.         return $this->requestModificationsResponsable;
  628.     }
  629.     public function addRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
  630.     {
  631.         if (!$this->requestModificationsResponsable->contains($requestModificationsResponsable)) {
  632.             $this->requestModificationsResponsable[] = $requestModificationsResponsable;
  633.             $requestModificationsResponsable->setResponsable($this);
  634.         }
  635.         return $this;
  636.     }
  637.     public function removeRequestModificationsResponsable(RequestModification $requestModificationsResponsable): self
  638.     {
  639.         if ($this->requestModificationsResponsable->removeElement($requestModificationsResponsable)) {
  640.             // set the owning side to null (unless already changed)
  641.             if ($requestModificationsResponsable->getResponsable() === $this) {
  642.                 $requestModificationsResponsable->setResponsable(null);
  643.             }
  644.         }
  645.         return $this;
  646.     }
  647.     /**
  648.      * @return Collection<int, Establishments>
  649.      */
  650.     public function getEstablishments(): Collection
  651.     {
  652.         return $this->establishments;
  653.     }
  654.     public function addEstablishment(Establishments $establishment): self
  655.     {
  656.         if (!$this->establishments->contains($establishment)) {
  657.             $this->establishments[] = $establishment;
  658.             $establishment->setResponsable($this);
  659.         }
  660.         return $this;
  661.     }
  662.     public function removeEstablishment(Establishments $establishment): self
  663.     {
  664.         if ($this->establishments->removeElement($establishment)) {
  665.             // set the owning side to null (unless already changed)
  666.             if ($establishment->getResponsable() === $this) {
  667.                 $establishment->setResponsable(null);
  668.             }
  669.         }
  670.         return $this;
  671.     }
  672.     public function getMyResponsable(): ?self
  673.     {
  674.         return $this->myResponsable;
  675.     }
  676.     public function setMyResponsable(?self $myResponsable): self
  677.     {
  678.         $this->myResponsable $myResponsable;
  679.         return $this;
  680.     }
  681.     /**
  682.      * @return Collection<int, self>
  683.      */
  684.     public function getMyCustomers(): Collection
  685.     {
  686.         return $this->myCustomers;
  687.     }
  688.     public function addMyCustomer(self $myCustomer): self
  689.     {
  690.         if (!$this->myCustomers->contains($myCustomer)) {
  691.             $this->myCustomers[] = $myCustomer;
  692.             $myCustomer->setMyResponsable($this);
  693.         }
  694.         return $this;
  695.     }
  696.     public function removeMyCustomer(self $myCustomer): self
  697.     {
  698.         if ($this->myCustomers->removeElement($myCustomer)) {
  699.             // set the owning side to null (unless already changed)
  700.             if ($myCustomer->getMyResponsable() === $this) {
  701.                 $myCustomer->setMyResponsable(null);
  702.             }
  703.         }
  704.         return $this;
  705.     }
  706.     public function isNotPresent(): ?bool
  707.     {
  708.         return $this->notPresent;
  709.     }
  710.     public function setNotPresent(bool $notPresent): self
  711.     {
  712.         $this->notPresent $notPresent;
  713.         return $this;
  714.     }
  715.     public function getCity(): ?string
  716.     {
  717.         return $this->city;
  718.     }
  719.     public function setCity(string $city): self
  720.     {
  721.         $this->city $city;
  722.         return $this;
  723.     }
  724.     public function getZip(): ?string
  725.     {
  726.         return $this->zip;
  727.     }
  728.     public function setZip(string $zip): self
  729.     {
  730.         $this->zip $zip;
  731.         return $this;
  732.     }
  733.     public function getNumberPhone(): ?string
  734.     {
  735.         return $this->numberPhone;
  736.     }
  737.     public function setNumberPhone(string $numberPhone): self
  738.     {
  739.         $this->numberPhone $numberPhone;
  740.         return $this;
  741.     }
  742.     /**
  743.      * @return Collection<int, Orders>
  744.      */
  745.     public function getOrders(): Collection
  746.     {
  747.         return $this->orders;
  748.     }
  749.     public function addOrder(Orders $order): self
  750.     {
  751.         if (!$this->orders->contains($order)) {
  752.             $this->orders[] = $order;
  753.             $order->setUser($this);
  754.         }
  755.         return $this;
  756.     }
  757.     public function removeOrder(Orders $order): self
  758.     {
  759.         if ($this->orders->removeElement($order)) {
  760.             // set the owning side to null (unless already changed)
  761.             if ($order->getUser() === $this) {
  762.                 $order->setUser(null);
  763.             }
  764.         }
  765.         return $this;
  766.     }
  767.     public function getPoints(): ?float
  768.     {
  769.         return $this->points;
  770.     }
  771.     public function setPoints(?float $points): self
  772.     {
  773.         $this->points $points;
  774.         return $this;
  775.     }
  776.     /**
  777.      * @return Collection<int, ShoppingCart>
  778.      */
  779.     public function getShoppingCartsUsers(): Collection
  780.     {
  781.         return $this->shoppingCartsUsers;
  782.     }
  783.     public function addShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
  784.     {
  785.         if (!$this->shoppingCartsUsers->contains($shoppingCartsUser)) {
  786.             $this->shoppingCartsUsers[] = $shoppingCartsUser;
  787.             $shoppingCartsUser->setUser($this);
  788.         }
  789.         return $this;
  790.     }
  791.     public function removeShoppingCartsUser(ShoppingCart $shoppingCartsUser): self
  792.     {
  793.         if ($this->shoppingCartsUsers->removeElement($shoppingCartsUser)) {
  794.             // set the owning side to null (unless already changed)
  795.             if ($shoppingCartsUser->getUser() === $this) {
  796.                 $shoppingCartsUser->setUser(null);
  797.             }
  798.         }
  799.         return $this;
  800.     }
  801.     /**
  802.      * @return Collection<int, ShoppingCart>
  803.      */
  804.     public function getShppingCartsUpdatedBy(): Collection
  805.     {
  806.         return $this->shppingCartsUpdatedBy;
  807.     }
  808.     public function addShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
  809.     {
  810.         if (!$this->shppingCartsUpdatedBy->contains($shppingCartsUpdatedBy)) {
  811.             $this->shppingCartsUpdatedBy[] = $shppingCartsUpdatedBy;
  812.             $shppingCartsUpdatedBy->setUpdatedBy($this);
  813.         }
  814.         return $this;
  815.     }
  816.     public function removeShppingCartsUpdatedBy(ShoppingCart $shppingCartsUpdatedBy): self
  817.     {
  818.         if ($this->shppingCartsUpdatedBy->removeElement($shppingCartsUpdatedBy)) {
  819.             // set the owning side to null (unless already changed)
  820.             if ($shppingCartsUpdatedBy->getUpdatedBy() === $this) {
  821.                 $shppingCartsUpdatedBy->setUpdatedBy(null);
  822.             }
  823.         }
  824.         return $this;
  825.     }
  826.     public function getClientCard(): ?string
  827.     {
  828.         return $this->clientCard;
  829.     }
  830.     public function setClientCard(?string $clientCard): self
  831.     {
  832.         $this->clientCard $clientCard;
  833.         return $this;
  834.     }
  835.     public function isCgvAccepted(): ?bool
  836.     {
  837.         return $this->cgvAccepted;
  838.     }
  839.     public function setCgvAccepted(bool $cgvAccepted): self
  840.     {
  841.         $this->cgvAccepted $cgvAccepted;
  842.         return $this;
  843.     }
  844.     /**
  845.      * @return Collection<int, Orders>
  846.      */
  847.     public function getLastPickupUpdateOrder(): Collection
  848.     {
  849.         return $this->lastPickupUpdateOrder;
  850.     }
  851.     public function addLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
  852.     {
  853.         if (!$this->lastPickupUpdateOrder->contains($lastPickupUpdateOrder)) {
  854.             $this->lastPickupUpdateOrder[] = $lastPickupUpdateOrder;
  855.             $lastPickupUpdateOrder->setLastPickupUpdateBy($this);
  856.         }
  857.         return $this;
  858.     }
  859.     public function removeLastPickupUpdateOrder(Orders $lastPickupUpdateOrder): self
  860.     {
  861.         if ($this->lastPickupUpdateOrder->removeElement($lastPickupUpdateOrder)) {
  862.             // set the owning side to null (unless already changed)
  863.             if ($lastPickupUpdateOrder->getLastPickupUpdateBy() === $this) {
  864.                 $lastPickupUpdateOrder->setLastPickupUpdateBy(null);
  865.             }
  866.         }
  867.         return $this;
  868.     }
  869.     public function getGenre(): ?string
  870.     {
  871.         return $this->genre;
  872.     }
  873.     public function setGenre(?string $genre): self
  874.     {
  875.         $this->genre $genre;
  876.         return $this;
  877.     }
  878.     public function getAddress(): ?string
  879.     {
  880.         return $this->address;
  881.     }
  882.     public function setAddress(?string $address): self
  883.     {
  884.         $this->address $address;
  885.         return $this;
  886.     }
  887.     public function getTvaNumber(): ?string
  888.     {
  889.         return $this->TvaNumber;
  890.     }
  891.     public function setTvaNumber(?string $TvaNumber): self
  892.     {
  893.         $this->TvaNumber $TvaNumber;
  894.         return $this;
  895.     }
  896.     public function getNewPasswordCode(): ?int
  897.     {
  898.         return $this->newPasswordCode;
  899.     }
  900.     public function setNewPasswordCode(?int $newPasswordCode): self
  901.     {
  902.         $this->newPasswordCode $newPasswordCode;
  903.         return $this;
  904.     }
  905. public function isEmailValidated(): ?bool
  906.     {
  907.         return $this->emailValidated;
  908.     }
  909.     public function setEmailValidated(bool $emailValidated): self
  910.     {
  911.         $this->emailValidated $emailValidated;
  912.         return $this;
  913.     }
  914.     public function getNewPasswordCreatedAt(): ?\DateTimeInterface
  915.     {
  916.         return $this->newPasswordCreatedAt;
  917.     }
  918.     public function setNewPasswordCreatedAt(?\DateTimeInterface $newPasswordCreatedAt): self
  919.     {
  920.         $this->newPasswordCreatedAt $newPasswordCreatedAt;
  921.         return $this;
  922.     }
  923.     public function getEmailValidationToken(): ?string
  924.     {
  925.         return $this->emailValidationToken;
  926.     }
  927.     public function setEmailValidationToken(?string $emailValidationToken): self
  928.     {
  929.         $this->emailValidationToken $emailValidationToken;
  930.         return $this;
  931.     }
  932.     /**
  933.      * @return Collection<int, Favorite>
  934.      */
  935.     public function getFavorites(): Collection
  936.     {
  937.         return $this->favorites;
  938.     }
  939.     public function addFavorite(Favorite $favorite): self
  940.     {
  941.         if (!$this->favorites->contains($favorite)) {
  942.             $this->favorites[] = $favorite;
  943.             $favorite->setUser($this);
  944.         }
  945.         return $this;
  946.     }
  947.     public function removeFavorite(Favorite $favorite): self
  948.     {
  949.         if ($this->favorites->removeElement($favorite)) {
  950.             // set the owning side to null (unless already changed)
  951.             if ($favorite->getUser() === $this) {
  952.                 $favorite->setUser(null);
  953.             }
  954.         }
  955.         return $this;
  956.     }
  957.     public function getNewPasswordToken(): ?string
  958.     {
  959.         return $this->newPasswordToken;
  960.     }
  961.     public function setNewPasswordToken(?string $newPasswordToken): self
  962.     {
  963.         $this->newPasswordToken $newPasswordToken;
  964.         return $this;
  965.     }
  966.     public function getStatusIntern(): ?userStatusIntern
  967.     {
  968.         return $this->statusIntern;
  969.     }
  970.     public function setStatusIntern(?userStatusIntern $statusIntern): self
  971.     {
  972.         $this->statusIntern $statusIntern;
  973.         return $this;
  974.     }
  975.     /**
  976.      * @return Collection<int, Banner>
  977.      */
  978.     public function getBanners(): Collection
  979.     {
  980.         return $this->banners;
  981.     }
  982.     public function addBanner(Banner $banner): self
  983.     {
  984.         if (!$this->banners->contains($banner)) {
  985.             $this->banners[] = $banner;
  986.             $banner->setCreatedBy($this);
  987.         }
  988.         return $this;
  989.     }
  990.     public function removeBanner(Banner $banner): self
  991.     {
  992.         if ($this->banners->removeElement($banner)) {
  993.             // set the owning side to null (unless already changed)
  994.             if ($banner->getCreatedBy() === $this) {
  995.                 $banner->setCreatedBy(null);
  996.             }
  997.         }
  998.         return $this;
  999.     }
  1000.     public function getTva(): ?TVA
  1001.     {
  1002.         return $this->tva;
  1003.     }
  1004.     public function setTva(?TVA $tva): self
  1005.     {
  1006.         $this->tva $tva;
  1007.         return $this;
  1008.     }
  1009.     public function isFirstConnexion(): ?bool
  1010.     {
  1011.         return $this->firstConnexion;
  1012.     }
  1013.     public function setFirstConnexion(bool $firstConnexion): self
  1014.     {
  1015.         $this->firstConnexion $firstConnexion;
  1016.         return $this;
  1017.     }
  1018.     /**
  1019.      * @return Collection<int, Invoice>
  1020.      */
  1021.     public function getInvoices(): Collection
  1022.     {
  1023.         return $this->invoices;
  1024.     }
  1025.     public function addInvoice(Invoice $invoice): self
  1026.     {
  1027.         if (!$this->invoices->contains($invoice)) {
  1028.             $this->invoices[] = $invoice;
  1029.             $invoice->setUser($this);
  1030.         }
  1031.         return $this;
  1032.     }
  1033.     public function removeInvoice(Invoice $invoice): self
  1034.     {
  1035.         if ($this->invoices->removeElement($invoice)) {
  1036.             // set the owning side to null (unless already changed)
  1037.             if ($invoice->getUser() === $this) {
  1038.                 $invoice->setUser(null);
  1039.             }
  1040.         }
  1041.         return $this;
  1042.     }
  1043.     /**
  1044.      * @return Collection<int, EmailInvoice>
  1045.      */
  1046.     public function getEmailInvoices(): Collection
  1047.     {
  1048.         return $this->emailInvoices;
  1049.     }
  1050.     public function addEmailInvoice(EmailInvoice $emailInvoice): self
  1051.     {
  1052.         if (!$this->emailInvoices->contains($emailInvoice)) {
  1053.             $this->emailInvoices[] = $emailInvoice;
  1054.             $emailInvoice->setAddedBy($this);
  1055.         }
  1056.         return $this;
  1057.     }
  1058.     public function removeEmailInvoice(EmailInvoice $emailInvoice): self
  1059.     {
  1060.         if ($this->emailInvoices->removeElement($emailInvoice)) {
  1061.             // set the owning side to null (unless already changed)
  1062.             if ($emailInvoice->getAddedBy() === $this) {
  1063.                 $emailInvoice->setAddedBy(null);
  1064.             }
  1065.         }
  1066.         return $this;
  1067.     }
  1068.     /**
  1069.      * @return Collection<int, ArticleOrderOutOfStock>
  1070.      */
  1071.     public function getArticleOrderOutOfStocks(): Collection
  1072.     {
  1073.         return $this->articleOrderOutOfStocks;
  1074.     }
  1075.     public function addArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
  1076.     {
  1077.         if (!$this->articleOrderOutOfStocks->contains($articleOrderOutOfStock)) {
  1078.             $this->articleOrderOutOfStocks[] = $articleOrderOutOfStock;
  1079.             $articleOrderOutOfStock->setUser($this);
  1080.         }
  1081.         return $this;
  1082.     }
  1083.     public function removeArticleOrderOutOfStock(ArticleOrderOutOfStock $articleOrderOutOfStock): self
  1084.     {
  1085.         if ($this->articleOrderOutOfStocks->removeElement($articleOrderOutOfStock)) {
  1086.             // set the owning side to null (unless already changed)
  1087.             if ($articleOrderOutOfStock->getUser() === $this) {
  1088.                 $articleOrderOutOfStock->setUser(null);
  1089.             }
  1090.         }
  1091.         return $this;
  1092.     }
  1093.     /**
  1094.      * @return Collection<int, BackOrder>
  1095.      */
  1096.     public function getBackOrders(): Collection
  1097.     {
  1098.         return $this->backOrders;
  1099.     }
  1100.     public function addBackOrder(BackOrder $backOrder): self
  1101.     {
  1102.         if (!$this->backOrders->contains($backOrder)) {
  1103.             $this->backOrders[] = $backOrder;
  1104.             $backOrder->setUser($this);
  1105.         }
  1106.         return $this;
  1107.     }
  1108.     public function removeBackOrder(BackOrder $backOrder): self
  1109.     {
  1110.         if ($this->backOrders->removeElement($backOrder)) {
  1111.             // set the owning side to null (unless already changed)
  1112.             if ($backOrder->getUser() === $this) {
  1113.                 $backOrder->setUser(null);
  1114.             }
  1115.         }
  1116.         return $this;
  1117.     }
  1118.     /**
  1119.      * @return Collection<int, InvoiceDownloads>
  1120.      */
  1121.     public function getInvoiceDownloads(): Collection
  1122.     {
  1123.         return $this->invoiceDownloads;
  1124.     }
  1125.     public function addInvoiceDownload(InvoiceDownloads $invoiceDownload): self
  1126.     {
  1127.         if (!$this->invoiceDownloads->contains($invoiceDownload)) {
  1128.             $this->invoiceDownloads[] = $invoiceDownload;
  1129.             $invoiceDownload->setUser($this);
  1130.         }
  1131.         return $this;
  1132.     }
  1133.     public function removeInvoiceDownload(InvoiceDownloads $invoiceDownload): self
  1134.     {
  1135.         if ($this->invoiceDownloads->removeElement($invoiceDownload)) {
  1136.             // set the owning side to null (unless already changed)
  1137.             if ($invoiceDownload->getUser() === $this) {
  1138.                 $invoiceDownload->setUser(null);
  1139.             }
  1140.         }
  1141.         return $this;
  1142.     }
  1143.     /**
  1144.      * @return Collection<int, Articles>
  1145.      */
  1146.     public function getArticlesChangeVisibility(): Collection
  1147.     {
  1148.         return $this->articlesChangeVisibility;
  1149.     }
  1150.     public function addArticlesChangeVisibility(Articles $article): self
  1151.     {
  1152.         if (!$this->articlesChangeVisibility->contains($article)) {
  1153.             $this->articlesChangeVisibility[] = $article;
  1154.             $article->setVisibleBy($this);
  1155.         }
  1156.         return $this;
  1157.     }
  1158.     public function removeArticlesChangeVisibility(Articles $article): self
  1159.     {
  1160.         if ($this->articlesChangeVisibility->removeElement($article)) {
  1161.             // set the owning side to null (unless already changed)
  1162.             if ($article->getVisibleBy() === $this) {
  1163.                 $article->setVisibleBy(null);
  1164.             }
  1165.         }
  1166.         return $this;
  1167.     }
  1168.     /**
  1169.      * @return Collection<int, ChildTags>
  1170.      */
  1171.     public function getChildTagsUpdate(): Collection
  1172.     {
  1173.         return $this->childTagsUpdate;
  1174.     }
  1175.     public function addChildTagsUpdate(ChildTags $childTagsUpdate): self
  1176.     {
  1177.         if (!$this->childTagsUpdate->contains($childTagsUpdate)) {
  1178.             $this->childTagsUpdate[] = $childTagsUpdate;
  1179.             $childTagsUpdate->setUpdatedBy($this);
  1180.         }
  1181.         return $this;
  1182.     }
  1183.     public function removeChildTagsUpdate(ChildTags $childTagsUpdate): self
  1184.     {
  1185.         if ($this->childTagsUpdate->removeElement($childTagsUpdate)) {
  1186.             // set the owning side to null (unless already changed)
  1187.             if ($childTagsUpdate->getUpdatedBy() === $this) {
  1188.                 $childTagsUpdate->setUpdatedBy(null);
  1189.             }
  1190.         }
  1191.         return $this;
  1192.     }
  1193.     /**
  1194.      * @return Collection<int, TagGroups>
  1195.      */
  1196.     public function getTagGroupsUpdate(): Collection
  1197.     {
  1198.         return $this->TagGroupsUpdate;
  1199.     }
  1200.     public function addTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
  1201.     {
  1202.         if (!$this->tagGroupsUpdate->contains($tagGroupsUpdate)) {
  1203.             $this->tagGroupsUpdate[] = $tagGroupsUpdate;
  1204.             $tagGroupsUpdate->setUpdatedBy($this);
  1205.         }
  1206.         return $this;
  1207.     }
  1208.     public function removeTagGroupsUpdate(TagGroups $tagGroupsUpdate): self
  1209.     {
  1210.         if ($this->tagGroupsUpdate->removeElement($tagGroupsUpdate)) {
  1211.             // set the owning side to null (unless already changed)
  1212.             if ($tagGroupsUpdate->getUpdatedBy() === $this) {
  1213.                 $tagGroupsUpdate->setUpdatedBy(null);
  1214.             }
  1215.         }
  1216.         return $this;
  1217.     }
  1218.     /**
  1219.      * @return Collection<int, Feedback>
  1220.      */
  1221.     public function getFeedback(): Collection
  1222.     {
  1223.         return $this->feedback;
  1224.     }
  1225.     public function addFeedback(Feedback $feedback): self
  1226.     {
  1227.         if (!$this->feedback->contains($feedback)) {
  1228.             $this->feedback[] = $feedback;
  1229.             $feedback->setUser($this);
  1230.         }
  1231.         return $this;
  1232.     }
  1233.     public function removeFeedback(Feedback $feedback): self
  1234.     {
  1235.         if ($this->feedback->removeElement($feedback)) {
  1236.             // set the owning side to null (unless already changed)
  1237.             if ($feedback->getUser() === $this) {
  1238.                 $feedback->setUser(null);
  1239.             }
  1240.         }
  1241.         return $this;
  1242.     }
  1243.     public function getDeletedAt(): ?\DateTimeInterface
  1244.     {
  1245.         return $this->deletedAt;
  1246.     }
  1247.     public function setDeletedAt(?\DateTimeInterface $deletedAt): self
  1248.     {
  1249.         $this->deletedAt $deletedAt;
  1250.         return $this;
  1251.     }
  1252.     public function getDeletedBy(): ?self
  1253.     {
  1254.         return $this->deletedBy;
  1255.     }
  1256.     public function setDeletedBy(?self $deletedBy): self
  1257.     {
  1258.         $this->deletedBy $deletedBy;
  1259.         return $this;
  1260.     }
  1261.     public function getZendeskId(): ?string
  1262.     {
  1263.         return $this->zendeskId;
  1264.     }
  1265.     public function setZendeskId(?string $zendeskId): self
  1266.     {
  1267.         $this->zendeskId $zendeskId;
  1268.         return $this;
  1269.     }
  1270.     public function getConnectedAt(): ?Establishments
  1271.     {
  1272.         return $this->connectedAt;
  1273.     }
  1274.     public function setConnectedAt(?Establishments $connectedAt): self
  1275.     {
  1276.         $this->connectedAt $connectedAt;
  1277.         return $this;
  1278.     }
  1279. }