src/Entity/User.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Model\UserModel;
  4. use App\Entity\ReseauSociaux\Comments;
  5. use App\Entity\ReseauSociaux\Conversation;
  6. use App\Entity\ReseauSociaux\Espace;
  7. use App\Entity\ReseauSociaux\Message;
  8. use App\Entity\ReseauSociaux\Notifications;
  9. use App\Entity\ReseauSociaux\Publication;
  10. use App\Entity\ReseauSociaux\PostLike;
  11. use App\Entity\ReseauSociaux\SharePost;
  12. use App\Entity\ReseauSociaux\InvitationEspace;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use App\Repository\UserRepository;
  15. use Doctrine\Common\Collections\Collection;
  16. use Doctrine\Common\Collections\ArrayCollection;
  17. use Symfony\Component\Serializer\Annotation\Groups;
  18. use Symfony\Component\Validator\Constraints as Assert;
  19. use Symfony\Component\Security\Core\User\UserInterface;
  20. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  21. /**
  22.  * @ORM\Entity(repositoryClass=UserRepository::class)
  23.  * @UniqueEntity(fields={"email"}, message="Cette adresse mail est déjà utilisée")
  24.  */
  25. class User extends UserModel implements UserInterface
  26. {
  27.     /**
  28.      * @ORM\Id()
  29.      * @ORM\GeneratedValue()
  30.      * @ORM\Column(type="integer")
  31.      * @Groups({"post:read", "connect:read","show:read", "publication:read", "message:read", "commentaire:read", "notif:read", "group:read", "member:read", "invitation:read"})
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\Column(type="string", length=10, nullable=true)
  36.      */
  37.     private $civility;
  38.     /**
  39.      * @ORM\Column(type="string", length=255, nullable=true)
  40.      *
  41.      * @Assert\NotBlank(message="Veuillez renseigner votre prénom")
  42.      * @Groups({"post:read","connect:read","show:read", "publication:read", "commentaire:read", "notif:read","message:read","group:read","member:read", "invitation:read"})
  43.      */
  44.     private $firstName;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      *
  48.      * @Assert\NotBlank(message="Veuillez renseigner votre nom")
  49.      * @Groups({"post:read","connect:read","show:read", "publication:read", "commentaire:read", "notif:read","message:read","group:read","member:read","invitation:read"})
  50.      */
  51.     private $lastName;
  52.     /**
  53.      * @ORM\Column(type="string", length=10)
  54.      * @Groups("show:read")
  55.      */
  56.     private $phone;
  57.     /**
  58.      * @ORM\Column(type="date", nullable=true)
  59.      */
  60.     private $weddingDate;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      * @Groups({"post:read","connect:read", "publication:read", "show:read", "commentaire:read", "notif:read"})
  64.      */
  65.     private $image;
  66.     /**
  67.      * @ORM\OneToMany(targetEntity=Command::class, mappedBy="client")
  68.      */
  69.     private $commands;
  70.     /**
  71.      * @ORM\Column(type="string", length=255, nullable=true)
  72.      */
  73.     private $idStripe;
  74.     /**
  75.      * @ORM\OneToMany(targetEntity=WishList::class, mappedBy="user")
  76.      */
  77.     private $wishLists;
  78.     /**
  79.      * @ORM\OneToMany(targetEntity=Avis::class, mappedBy="client")
  80.      */
  81.     private $avis;
  82.     /**
  83.      * @ORM\OneToMany(targetEntity=Messaging::class, mappedBy="messageUser")     * 
  84.      */
  85.     private $messagings;
  86.     /**
  87.      * @ORM\OneToMany(targetEntity=Ticket::class, mappedBy="createdBy", orphanRemoval=true)
  88.      */
  89.     private $tickets;
  90.     /**
  91.      * @ORM\OneToMany(targetEntity=TableUser::class, mappedBy="userClient", cascade={"remove"})
  92.      */
  93.     private $tableUsers;
  94.     /**
  95.      * @ORM\OneToMany(targetEntity=Litige::class, mappedBy="user")
  96.      */
  97.     private $litiges;
  98.     /**
  99.      * @ORM\Column(type="string", length=255, nullable=true)
  100.      */
  101.     private $livraisonAdress;
  102.     /**
  103.      * @ORM\Column(type="string", length=255, nullable=true)
  104.      */
  105.     private $livraisonZipCode;
  106.     /**
  107.      * @ORM\Column(type="string", length=255, nullable=true)
  108.      */
  109.     private $livraisonCity;
  110.     /**
  111.      * @ORM\Column(type="datetime", nullable=true, options={"default": "CURRENT_TIMESTAMP"})
  112.      * @Assert\NotBlank(message="Veuillez renseigner votre date de naissance !!")
  113.      */
  114.     private $birthAt;
  115.     /**
  116.      * @ORM\Column(type="string", length=3, nullable=true)
  117.      * @Assert\NotBlank(message="Veuillez renseigner votre nationalité !!")
  118.      */
  119.     private $nationality;
  120.     /**
  121.      * @ORM\Column(type="string", length=3, nullable=true)
  122.      * @Assert\NotBlank(message="Veuillez renseigner votre pays de résidence !!")
  123.      */
  124.     private $countryResidence;
  125.     /**
  126.      * @ORM\Column(type="string", length=255, nullable=true)
  127.      */
  128.     private $mangoId;
  129.     /**
  130.      * @ORM\Column(type="boolean", nullable=true)
  131.      */
  132.     private $isValid;
  133.     /**
  134.      * @ORM\Column(type="string", length=255, nullable=true)
  135.      */
  136.     private $serviceAddress;
  137.     /**
  138.      * @ORM\Column(type="string", length=5, nullable=true)
  139.      */
  140.     private $serviceZipCode;
  141.     /**
  142.      * @ORM\Column(type="string", length=255, nullable=true)
  143.      */
  144.     private $serviceCity;
  145.     /**
  146.      * @ORM\OneToMany(targetEntity=Annonce::class, mappedBy="users")
  147.      */
  148.     private $annonces;
  149.     /**
  150.      * @ORM\OneToMany(targetEntity=Location::class, mappedBy="client", orphanRemoval=true)
  151.      */
  152.     private $locations;
  153.     /**
  154.      * @ORM\OneToMany(targetEntity=Reservation::class, mappedBy="client", orphanRemoval=true)
  155.      */
  156.     private $reservations;
  157.     /**
  158.      * @ORM\Column(type="boolean", nullable=true)
  159.      * @Groups("post:read","connect:read","show:read")
  160.      */
  161.     private $statuCon;
  162.     /**
  163.      * @ORM\Column(type="datetime", nullable=true)
  164.      * @Groups("post:read","connect:read")
  165.      */
  166.     private $etatNetwork;
  167.     /**
  168.      * @ORM\OneToMany(targetEntity=Caution::class, mappedBy="user")
  169.      */
  170.     private $cautions;
  171.     /**
  172.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="sender")
  173.      */
  174.     private $messages;
  175.     /**
  176.      * @ORM\OneToMany(targetEntity=Conversation::class, mappedBy="utilisateur1")
  177.      */
  178.     private $conversations;
  179.     /**
  180.      * @ORM\OneToMany(targetEntity=Conversation::class, mappedBy="utilisateur2")
  181.      */
  182.     private $conversations2;
  183.     /**
  184.      * @ORM\OneToMany(targetEntity=Espace::class, mappedBy="propriotaire")
  185.      * @Groups("post:read")
  186.      */
  187.     private $espaces;
  188.     /**
  189.      * @ORM\OneToMany(targetEntity=Publication::class, mappedBy="client")
  190.      */
  191.     private $publications;
  192.     /**
  193.      * @ORM\ManyToMany(targetEntity=Espace::class, inversedBy="users")
  194.      * @Groups("post:read")
  195.      */
  196.     private $follow;
  197.     /**
  198.      * @ORM\OneToMany(targetEntity=Comments::class, mappedBy="author")
  199.      */
  200.     private $comments;
  201.     /**
  202.      * @ORM\OneToMany(targetEntity=Notifications::class, mappedBy="user")
  203.      */
  204.     private $notifications;
  205.     /**
  206.      * @ORM\OneToMany(targetEntity=PostLike::class, mappedBy="user")
  207.      */
  208.     private $likes;
  209.     /**
  210.      * @ORM\OneToMany(targetEntity=SharePost::class, mappedBy="author")
  211.      */
  212.     private $share;
  213.     /**
  214.      * @ORM\OneToMany(targetEntity=PendingLocation::class, mappedBy="user")
  215.      */
  216.     private $pendingLocations;
  217.     /**
  218.      * @ORM\OneToMany(targetEntity=PendingReservation::class, mappedBy="user")
  219.      */
  220.     private $pendingReservations;
  221.     /**
  222.      * @ORM\OneToMany(targetEntity=Notification::class, mappedBy="customer")
  223.      */
  224.     private $notificationReservation;
  225.     /**
  226.      * @ORM\Column(type="json")
  227.      * @Groups({"show:read"})
  228.      */
  229.     protected $roles = [];
  230.     /**
  231.      * @ORM\OneToMany(targetEntity=InvitationEspace::class, mappedBy="user")
  232.      */
  233.     private $invitationEspaces;
  234.     /**
  235.      * @Groups({"show:read"})
  236.      */
  237.     public function getRoles(): array
  238.     {
  239.         $roles $this->roles;
  240.         // guarantee every user at least has ROLE_USER
  241.         $roles[] = 'ROLE_USER';
  242.         return array_unique($roles);
  243.     }
  244.     public function setRoles(array $roles): self
  245.     {
  246.         $this->roles $roles;
  247.         return $this;
  248.     }
  249.     public function __construct()
  250.     {
  251.         $this->commands = new ArrayCollection();
  252.         $this->wishLists = new ArrayCollection();
  253.         $this->avis = new ArrayCollection();
  254.         $this->messagings = new ArrayCollection();
  255.         $this->tickets = new ArrayCollection();
  256.         $this->tableUsers = new ArrayCollection();
  257.         $this->litiges = new ArrayCollection();
  258.         $this->isValid false;
  259.         $this->annonces = new ArrayCollection();
  260.         $this->locations = new ArrayCollection();
  261.         $this->reservations = new ArrayCollection();
  262.         $this->cautions = new ArrayCollection();
  263.         $this->messages = new ArrayCollection();
  264.         $this->conversations = new ArrayCollection();
  265.         $this->espaces = new ArrayCollection();
  266.         $this->publications = new ArrayCollection();
  267.         $this->follow = new ArrayCollection();
  268.         $this->comments = new ArrayCollection();
  269.         $this->notifications = new ArrayCollection();
  270.         $this->likes = new ArrayCollection();
  271.         $this->share = new ArrayCollection();
  272.         $this->pendingLocations = new ArrayCollection();
  273.         $this->pendingReservations = new ArrayCollection();
  274.         $this->notificationReservation = new ArrayCollection();
  275.         $this->conversations2 = new ArrayCollection();
  276.         $this->invitationEspaces = new ArrayCollection();
  277.     }
  278.     /**
  279.      * @Groups({"show:read", "publication:read"})
  280.      */
  281.     public function getId(): ?int
  282.     {
  283.         return $this->id;
  284.     }
  285.     public function getCivility(): ?string
  286.     {
  287.         return $this->civility;
  288.     }
  289.     public function setCivility(?string $civility): self
  290.     {
  291.         $this->civility $civility;
  292.         return $this;
  293.     }
  294.     /**
  295.      * @Groups("show:read", "publication:read")
  296.      */
  297.     public function getFirstName(): ?string
  298.     {
  299.         return $this->firstName;
  300.     }
  301.     public function setFirstName(?string $firstName): self
  302.     {
  303.         $this->firstName $firstName;
  304.         return $this;
  305.     }
  306.     /**
  307.      * @Groups("show:read", "publication:read")
  308.      */
  309.     public function getLastName(): ?string
  310.     {
  311.         return $this->lastName;
  312.     }
  313.     public function setLastName(?string $lastName): self
  314.     {
  315.         $this->lastName $lastName;
  316.         return $this;
  317.     }
  318.     public function getPhone(): ?string
  319.     {
  320.         return $this->phone;
  321.     }
  322.     public function setPhone(?string $phone): self
  323.     {
  324.         $this->phone $phone;
  325.         return $this;
  326.     }
  327.     public function getWeddingDate(): ?\DateTimeInterface
  328.     {
  329.         return $this->weddingDate;
  330.     }
  331.     public function setWeddingDate(?\DateTimeInterface $weddingDate): self
  332.     {
  333.         $this->weddingDate $weddingDate;
  334.         return $this;
  335.     }
  336.     /**
  337.      * @Groups("show:read", "publication:read")
  338.      */
  339.     public function getImage(): ?string
  340.     {
  341.         return $this->image;
  342.     }
  343.     public function setImage(?string $image): self
  344.     {
  345.         $this->image $image;
  346.         return $this;
  347.     }
  348.     /**
  349.      * @return Collection|Command[]
  350.      */
  351.     public function getCommands(): Collection
  352.     {
  353.         return $this->commands;
  354.     }
  355.     public function addCommand(Command $command): self
  356.     {
  357.         if (!$this->commands->contains($command)) {
  358.             $this->commands[] = $command;
  359.             $command->setClient($this);
  360.         }
  361.         return $this;
  362.     }
  363.     public function removeCommand(Command $command): self
  364.     {
  365.         if ($this->commands->contains($command)) {
  366.             $this->commands->removeElement($command);
  367.             // set the owning side to null (unless already changed)
  368.             if ($command->getClient() === $this) {
  369.                 $command->setClient(null);
  370.             }
  371.         }
  372.         return $this;
  373.     }
  374.     public function getIdStripe(): ?string
  375.     {
  376.         return $this->idStripe;
  377.     }
  378.     public function setIdStripe(?string $idStripe): self
  379.     {
  380.         $this->idStripe $idStripe;
  381.         return $this;
  382.     }
  383.     /**
  384.      * @return Collection|WishList[]
  385.      */
  386.     public function getWishLists(): Collection
  387.     {
  388.         return $this->wishLists;
  389.     }
  390.     public function addWishList(WishList $wishList): self
  391.     {
  392.         if (!$this->wishLists->contains($wishList)) {
  393.             $this->wishLists[] = $wishList;
  394.             $wishList->setUser($this);
  395.         }
  396.         return $this;
  397.     }
  398.     public function removeWishList(WishList $wishList): self
  399.     {
  400.         if ($this->wishLists->contains($wishList)) {
  401.             $this->wishLists->removeElement($wishList);
  402.             // set the owning side to null (unless already changed)
  403.             if ($wishList->getUser() === $this) {
  404.                 $wishList->setUser(null);
  405.             }
  406.         }
  407.         return $this;
  408.     }
  409.     /**
  410.      * @return Collection|Avis[]
  411.      */
  412.     public function getAvis(): Collection
  413.     {
  414.         return $this->avis;
  415.     }
  416.     public function addAvi(Avis $avi): self
  417.     {
  418.         if (!$this->avis->contains($avi)) {
  419.             $this->avis[] = $avi;
  420.             $avi->setClient($this);
  421.         }
  422.         return $this;
  423.     }
  424.     public function removeAvi(Avis $avi): self
  425.     {
  426.         if ($this->avis->contains($avi)) {
  427.             $this->avis->removeElement($avi);
  428.             // set the owning side to null (unless already changed)
  429.             if ($avi->getClient() === $this) {
  430.                 $avi->setClient(null);
  431.             }
  432.         }
  433.         return $this;
  434.     }
  435.     /**
  436.      * @return Collection|Messaging[]
  437.      */
  438.     public function getMessagings(): Collection
  439.     {
  440.         return $this->messagings;
  441.     }
  442.     public function addMessaging(Messaging $messaging): self
  443.     {
  444.         if (!$this->messagings->contains($messaging)) {
  445.             $this->messagings[] = $messaging;
  446.             $messaging->setMessageUser($this);
  447.         }
  448.         return $this;
  449.     }
  450.     public function removeMessaging(Messaging $messaging): self
  451.     {
  452.         if ($this->messagings->contains($messaging)) {
  453.             $this->messagings->removeElement($messaging);
  454.             // set the owning side to null (unless already changed)
  455.             if ($messaging->getMessageUser() === $this) {
  456.                 $messaging->setMessageUser(null);
  457.             }
  458.         }
  459.         return $this;
  460.     }
  461.     /**
  462.      * @return Collection|Ticket[]
  463.      */
  464.     public function getTickets(): Collection
  465.     {
  466.         return $this->tickets;
  467.     }
  468.     public function addTicket(Ticket $ticket): self
  469.     {
  470.         if (!$this->tickets->contains($ticket)) {
  471.             $this->tickets[] = $ticket;
  472.             $ticket->setCreatedBy($this);
  473.         }
  474.         return $this;
  475.     }
  476.     public function removeTicket(Ticket $ticket): self
  477.     {
  478.         if ($this->tickets->contains($ticket)) {
  479.             $this->tickets->removeElement($ticket);
  480.             // set the owning side to null (unless already changed)
  481.             if ($ticket->getCreatedBy() === $this) {
  482.                 $ticket->setCreatedBy(null);
  483.             }
  484.         }
  485.         return $this;
  486.     }
  487.     public function displayName()
  488.     {
  489.         return $this->firstName ' ' $this->lastName ' - ' $this->email;
  490.     }
  491.     /**
  492.      * @return Collection|TableUser[]
  493.      */
  494.     public function getTableUsers(): Collection
  495.     {
  496.         return $this->tableUsers;
  497.     }
  498.     public function addTableUser(TableUser $tableUser): self
  499.     {
  500.         if (!$this->tableUsers->contains($tableUser)) {
  501.             $this->tableUsers[] = $tableUser;
  502.             $tableUser->setUserClient($this);
  503.         }
  504.         return $this;
  505.     }
  506.     public function removeTableUser(TableUser $tableUser): self
  507.     {
  508.         if ($this->tableUsers->contains($tableUser)) {
  509.             $this->tableUsers->removeElement($tableUser);
  510.             // set the owning side to null (unless already changed)
  511.             if ($tableUser->getUserClient() === $this) {
  512.                 $tableUser->setUserClient(null);
  513.             }
  514.         }
  515.         return $this;
  516.     }
  517.     /**
  518.      * @return Collection|Litige[]
  519.      */
  520.     public function getLitiges(): Collection
  521.     {
  522.         return $this->litiges;
  523.     }
  524.     public function addLitige(Litige $litige): self
  525.     {
  526.         if (!$this->litiges->contains($litige)) {
  527.             $this->litiges[] = $litige;
  528.             $litige->setUser($this);
  529.         }
  530.         return $this;
  531.     }
  532.     public function removeLitige(Litige $litige): self
  533.     {
  534.         if ($this->litiges->contains($litige)) {
  535.             $this->litiges->removeElement($litige);
  536.             // set the owning side to null (unless already changed)
  537.             if ($litige->getUser() === $this) {
  538.                 $litige->setUser(null);
  539.             }
  540.         }
  541.         return $this;
  542.     }
  543.     public function getLivraisonAdress(): ?string
  544.     {
  545.         return $this->livraisonAdress;
  546.     }
  547.     public function setLivraisonAdress(?string $livraisonAdress): self
  548.     {
  549.         $this->livraisonAdress $livraisonAdress;
  550.         return $this;
  551.     }
  552.     public function getLivraisonZipCode(): ?string
  553.     {
  554.         return $this->livraisonZipCode;
  555.     }
  556.     public function setLivraisonZipCode(?string $livraisonZipCode): self
  557.     {
  558.         $this->livraisonZipCode $livraisonZipCode;
  559.         return $this;
  560.     }
  561.     public function getLivraisonCity(): ?string
  562.     {
  563.         return $this->livraisonCity;
  564.     }
  565.     public function setLivraisonCity(?string $livraisonCity): self
  566.     {
  567.         $this->livraisonCity $livraisonCity;
  568.         return $this;
  569.     }
  570.     public function getBirthAt(): ?\DateTimeInterface
  571.     {
  572.         return $this->birthAt;
  573.     }
  574.     public function setBirthAt(?\DateTimeInterface $birthAt): self
  575.     {
  576.         $this->birthAt $birthAt;
  577.         return $this;
  578.     }
  579.     public function getNationality(): ?string
  580.     {
  581.         return $this->nationality;
  582.     }
  583.     public function setNationality(?string $nationality): self
  584.     {
  585.         $this->nationality $nationality;
  586.         return $this;
  587.     }
  588.     public function getCountryResidence(): ?string
  589.     {
  590.         return $this->countryResidence;
  591.     }
  592.     public function setCountryResidence(?string $countryResidence): self
  593.     {
  594.         $this->countryResidence $countryResidence;
  595.         return $this;
  596.     }
  597.     public function getMangoId(): ?string
  598.     {
  599.         return $this->mangoId;
  600.     }
  601.     public function setMangoId(string $mangoId): self
  602.     {
  603.         $this->mangoId $mangoId;
  604.         return $this;
  605.     }
  606.     public function getIsValid(): ?bool
  607.     {
  608.         return $this->isValid;
  609.     }
  610.     public function setIsValid(?bool $isValid): self
  611.     {
  612.         $this->isValid $isValid;
  613.         return $this;
  614.     }
  615.     public function getServiceAddress(): ?string
  616.     {
  617.         return $this->serviceAddress;
  618.     }
  619.     public function setServiceAddress(?string $serviceAddress): self
  620.     {
  621.         $this->serviceAddress $serviceAddress;
  622.         return $this;
  623.     }
  624.     public function getServiceZipCode(): ?string
  625.     {
  626.         return $this->serviceZipCode;
  627.     }
  628.     public function setServiceZipCode(?string $serviceZipCode): self
  629.     {
  630.         $this->serviceZipCode $serviceZipCode;
  631.         return $this;
  632.     }
  633.     public function getServiceCity(): ?string
  634.     {
  635.         return $this->serviceCity;
  636.     }
  637.     public function setServiceCity(?string $serviceCity): self
  638.     {
  639.         $this->serviceCity $serviceCity;
  640.         return $this;
  641.     }
  642.     /**
  643.      * @return Collection|Annonce[]
  644.      */
  645.     public function getAnnonces(): Collection
  646.     {
  647.         return $this->annonces;
  648.     }
  649.     public function addAnnonce(Annonce $annonce): self
  650.     {
  651.         if (!$this->annonces->contains($annonce)) {
  652.             $this->annonces[] = $annonce;
  653.             $annonce->setUsers($this);
  654.         }
  655.         return $this;
  656.     }
  657.     public function removeAnnonce(Annonce $annonce): self
  658.     {
  659.         if ($this->annonces->removeElement($annonce)) {
  660.             // set the owning side to null (unless already changed)
  661.             if ($annonce->getUsers() === $this) {
  662.                 $annonce->setUsers(null);
  663.             }
  664.         }
  665.         return $this;
  666.     }
  667.     /**
  668.      * @return Collection|Location[]
  669.      */
  670.     public function getLocations(): Collection
  671.     {
  672.         return $this->locations;
  673.     }
  674.     public function addLocation(Location $location): self
  675.     {
  676.         if (!$this->locations->contains($location)) {
  677.             $this->locations[] = $location;
  678.             $location->setProduct($this);
  679.         }
  680.         return $this;
  681.     }
  682.     public function removeLocation(Location $location): self
  683.     {
  684.         if ($this->locations->removeElement($location)) {
  685.             // set the owning side to null (unless already changed)
  686.             if ($location->getProduct() === $this) {
  687.                 $location->setProduct(null);
  688.             }
  689.         }
  690.         return $this;
  691.     }
  692.     /**
  693.      * @return Collection|Reservation[]
  694.      */
  695.     public function getReservations(): Collection
  696.     {
  697.         return $this->reservations;
  698.     }
  699.     public function addReservation(Reservation $reservation): self
  700.     {
  701.         if (!$this->reservations->contains($reservation)) {
  702.             $this->reservations[] = $reservation;
  703.             $reservation->setClient($this);
  704.         }
  705.         return $this;
  706.     }
  707.     public function removeReservation(Reservation $reservation): self
  708.     {
  709.         if ($this->reservations->removeElement($reservation)) {
  710.             // set the owning side to null (unless already changed)
  711.             if ($reservation->getClient() === $this) {
  712.                 $reservation->setClient(null);
  713.             }
  714.         }
  715.         return $this;
  716.     }
  717.     /*public function getStatusUser(): ?bool
  718.     {
  719.         return $this->status_User;
  720.     }*/
  721.     public function getStatuCon(): ?bool
  722.     {
  723.         return $this->statuCon;
  724.     }
  725.     public function setStatuCon(?bool $statuCon): self
  726.     {
  727.         $this->statuCon $statuCon;
  728.         return $this;
  729.     }
  730.     public function getEtatNetwork(): ?\DateTimeInterface
  731.     {
  732.         return $this->etatNetwork;
  733.     }
  734.     public function setEtatNetwork(\DateTimeInterface $etatNetwork): self
  735.     {
  736.         $this->etatNetwork $etatNetwork;
  737.         return $this;
  738.     }
  739.     public function __toString()
  740.     {
  741.         return $this->getFirstName();
  742.     }
  743.     /**
  744.      * @return Collection|Caution[]
  745.      */
  746.     public function getCautions(): Collection
  747.     {
  748.         return $this->cautions;
  749.     }
  750.     public function addCaution(Caution $caution): self
  751.     {
  752.         if (!$this->cautions->contains($caution)) {
  753.             $this->cautions[] = $caution;
  754.             $caution->setUser($this);
  755.         }
  756.         return $this;
  757.     }
  758.     public function removeCaution(Caution $caution): self
  759.     {
  760.         if ($this->cautions->removeElement($caution)) {
  761.             // set the owning side to null (unless already changed)
  762.             if ($caution->getUser() === $this) {
  763.                 $caution->setUser(null);
  764.             }
  765.         }
  766.         return $this;
  767.     }
  768.     /**
  769.      * @return Collection|Message[]
  770.      */
  771.     public function getMessages(): Collection
  772.     {
  773.         return $this->messages;
  774.     }
  775.     public function addMessage(Message $message): self
  776.     {
  777.         if (!$this->messages->contains($message)) {
  778.             $this->messages[] = $message;
  779.             $message->setSender($this);
  780.         }
  781.         return $this;
  782.     }
  783.     public function removeMessage(Message $message): self
  784.     {
  785.         if ($this->messages->removeElement($message)) {
  786.             // set the owning side to null (unless already changed)
  787.             if ($message->getSender() === $this) {
  788.                 $message->setSender(null);
  789.             }
  790.         }
  791.         return $this;
  792.     }
  793.     /**
  794.      * @return Collection|Conversation[]
  795.      */
  796.     public function getConversations(): Collection
  797.     {
  798.         return $this->conversations;
  799.     }
  800.     public function addConversation(Conversation $conversation): self
  801.     {
  802.         if (!$this->conversations->contains($conversation)) {
  803.             $this->conversations[] = $conversation;
  804.             $conversation->setUtilisateur1($this);
  805.         }
  806.         return $this;
  807.     }
  808.     public function removeConversation(Conversation $conversation): self
  809.     {
  810.         if ($this->conversations->removeElement($conversation)) {
  811.             // set the owning side to null (unless already changed)
  812.             if ($conversation->getUtilisateur1() === $this) {
  813.                 $conversation->setUtilisateur1(null);
  814.             }
  815.         }
  816.         return $this;
  817.     }
  818.     public function getConversations2(): Collection
  819.     {
  820.         return $this->conversations2;
  821.     }
  822.     /**
  823.      * @return Collection|Espace[]
  824.      */
  825.     public function getEspaces(): Collection
  826.     {
  827.         return $this->espaces;
  828.     }
  829.     public function addEspace(Espace $espace): self
  830.     {
  831.         if (!$this->espaces->contains($espace)) {
  832.             $this->espaces[] = $espace;
  833.             $espace->setPropriotaire($this);
  834.         }
  835.         return $this;
  836.     }
  837.     public function removeEspace(Espace $espace): self
  838.     {
  839.         if ($this->espaces->removeElement($espace)) {
  840.             // set the owning side to null (unless already changed)
  841.             if ($espace->getPropriotaire() === $this) {
  842.                 $espace->setPropriotaire(null);
  843.             }
  844.         }
  845.         return $this;
  846.     }
  847.     /**
  848.      * @return Collection|Publication[]
  849.      */
  850.     public function getPublications(): Collection
  851.     {
  852.         return $this->publications;
  853.     }
  854.     public function addPublication(Publication $publication): self
  855.     {
  856.         if (!$this->publications->contains($publication)) {
  857.             $this->publications[] = $publication;
  858.             $publication->setClient($this);
  859.         }
  860.         return $this;
  861.     }
  862.     public function removePublication(Publication $publication): self
  863.     {
  864.         if ($this->publications->removeElement($publication)) {
  865.             // set the owning side to null (unless already changed)
  866.             if ($publication->getClient() === $this) {
  867.                 $publication->setClient(null);
  868.             }
  869.         }
  870.         return $this;
  871.     }
  872.     /**
  873.      * @return Collection|Espace[]
  874.      */
  875.     public function getFollow(): Collection
  876.     {
  877.         return $this->follow;
  878.     }
  879.     public function addFollow(Espace $follow): self
  880.     {
  881.         if (!$this->follow->contains($follow)) {
  882.             $this->follow[] = $follow;
  883.         }
  884.         return $this;
  885.     }
  886.     public function removeFollow(Espace $follow): self
  887.     {
  888.         $this->follow->removeElement($follow);
  889.         return $this;
  890.     }
  891.     /**
  892.      * @return Collection|Comments[]
  893.      */
  894.     public function getComments(): Collection
  895.     {
  896.         return $this->comments;
  897.     }
  898.     public function addComment(Comments $comment): self
  899.     {
  900.         if (!$this->comments->contains($comment)) {
  901.             $this->comments[] = $comment;
  902.             $comment->setAuthor($this);
  903.         }
  904.         return $this;
  905.     }
  906.     public function removeComment(Comments $comment): self
  907.     {
  908.         if ($this->comments->removeElement($comment)) {
  909.             // set the owning side to null (unless already changed)
  910.             if ($comment->getAuthor() === $this) {
  911.                 $comment->setAuthor(null);
  912.             }
  913.         }
  914.         return $this;
  915.     }
  916.     /**
  917.      * @return Collection|Notifications[]
  918.      */
  919.     public function getNotifications(): Collection
  920.     {
  921.         return $this->notifications;
  922.     }
  923.     public function addNotification(Notifications $notification): self
  924.     {
  925.         if (!$this->notifications->contains($notification)) {
  926.             $this->notifications[] = $notification;
  927.             $notification->setUser($this);
  928.         }
  929.         return $this;
  930.     }
  931.     public function removeNotification(Notifications $notification): self
  932.     {
  933.         if ($this->notifications->removeElement($notification)) {
  934.             // set the owning side to null (unless already changed)
  935.             if ($notification->getUser() === $this) {
  936.                 $notification->setUser(null);
  937.             }
  938.         }
  939.         return $this;
  940.     }
  941.     /**
  942.      * @return Collection|PostLike[]
  943.      */
  944.     public function getLikes(): Collection
  945.     {
  946.         return $this->likes;
  947.     }
  948.     public function addLike(PostLike $like): self
  949.     {
  950.         if (!$this->likes->contains($like)) {
  951.             $this->likes[] = $like;
  952.             $like->setUser($this);
  953.         }
  954.         return $this;
  955.     }
  956.     public function removeLike(PostLike $like): self
  957.     {
  958.         if ($this->likes->removeElement($like)) {
  959.             // set the owning side to null (unless already changed)
  960.             if ($like->getUser() === $this) {
  961.                 $like->setUser(null);
  962.             }
  963.         }
  964.         return $this;
  965.     }
  966.     /**
  967.      * @return Collection|SharePost[]
  968.      */
  969.     public function getShare(): Collection
  970.     {
  971.         return $this->share;
  972.     }
  973.     public function addShare(SharePost $share): self
  974.     {
  975.         if (!$this->share->contains($share)) {
  976.             $this->share[] = $share;
  977.             $share->setAuthor($this);
  978.         }
  979.         return $this;
  980.     }
  981.     public function removeShare(SharePost $share): self
  982.     {
  983.         if ($this->share->removeElement($share)) {
  984.             // set the owning side to null (unless already changed)
  985.             if ($share->getAuthor() === $this) {
  986.                 $share->setAuthor(null);
  987.             }
  988.         }
  989.         return $this;
  990.     }
  991.     /**
  992.      * @return Collection<int, PendingLocation>
  993.      */
  994.     public function getPendingLocations(): Collection
  995.     {
  996.         return $this->pendingLocations;
  997.     }
  998.     public function addPendingLocation(PendingLocation $pendingLocation): self
  999.     {
  1000.         if (!$this->pendingLocations->contains($pendingLocation)) {
  1001.             $this->pendingLocations[] = $pendingLocation;
  1002.             $pendingLocation->setUser($this);
  1003.         }
  1004.         return $this;
  1005.     }
  1006.     public function removePendingLocation(PendingLocation $pendingLocation): self
  1007.     {
  1008.         if ($this->pendingLocations->removeElement($pendingLocation)) {
  1009.             // set the owning side to null (unless already changed)
  1010.             if ($pendingLocation->getUser() === $this) {
  1011.                 $pendingLocation->setUser(null);
  1012.             }
  1013.         }
  1014.         return $this;
  1015.     }
  1016.     /**
  1017.      * @return Collection<int, PendingReservation>
  1018.      */
  1019.     public function getPendingReservations(): Collection
  1020.     {
  1021.         return $this->pendingReservations;
  1022.     }
  1023.     public function addPendingReservation(PendingReservation $pendingReservation): self
  1024.     {
  1025.         if (!$this->pendingReservations->contains($pendingReservation)) {
  1026.             $this->pendingReservations[] = $pendingReservation;
  1027.             $pendingReservation->setUser($this);
  1028.         }
  1029.         return $this;
  1030.     }
  1031.     public function removePendingReservation(PendingReservation $pendingReservation): self
  1032.     {
  1033.         if ($this->pendingReservations->removeElement($pendingReservation)) {
  1034.             // set the owning side to null (unless already changed)
  1035.             if ($pendingReservation->getUser() === $this) {
  1036.                 $pendingReservation->setUser(null);
  1037.             }
  1038.         }
  1039.         return $this;
  1040.     }
  1041.     /**
  1042.      * @return Collection<int, Notification>
  1043.      */
  1044.     public function getNotificationReservation(): Collection
  1045.     {
  1046.         return $this->notificationReservation;
  1047.     }
  1048.     public function addNotificationReservation(Notification $notificationReservation): self
  1049.     {
  1050.         if (!$this->notificationReservation->contains($notificationReservation)) {
  1051.             $this->notificationReservation[] = $notificationReservation;
  1052.             $notificationReservation->setCustomer($this);
  1053.         }
  1054.         return $this;
  1055.     }
  1056.     public function removeNotificationReservation(Notification $notificationReservation): self
  1057.     {
  1058.         if ($this->notificationReservation->removeElement($notificationReservation)) {
  1059.             // set the owning side to null (unless already changed)
  1060.             if ($notificationReservation->getCustomer() === $this) {
  1061.                 $notificationReservation->setCustomer(null);
  1062.             }
  1063.         }
  1064.         return $this;
  1065.     }
  1066.     /**
  1067.      * @return Collection<int, InvitationEspace>
  1068.      */
  1069.     public function getInvitationEspaces(): Collection
  1070.     {
  1071.         return $this->invitationEspaces;
  1072.     }
  1073.     public function addInvitationEspace(InvitationEspace $invitationEspace): self
  1074.     {
  1075.         if (!$this->invitationEspaces->contains($invitationEspace)) {
  1076.             $this->invitationEspaces[] = $invitationEspace;
  1077.             $invitationEspace->setUser($this);
  1078.         }
  1079.         return $this;
  1080.     }
  1081.     public function removeInvitationEspace(InvitationEspace $invitationEspace): self
  1082.     {
  1083.         if ($this->invitationEspaces->removeElement($invitationEspace)) {
  1084.             // set the owning side to null (unless already changed)
  1085.             if ($invitationEspace->getUser() === $this) {
  1086.                 $invitationEspace->setUser(null);
  1087.             }
  1088.         }
  1089.         return $this;
  1090.     }
  1091. }