src/Entity/User.php line 20

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. #[ORM\Entity(repositoryClassUserRepository::class)]
  13. #[ORM\Table(name'`user`')]
  14. #[UniqueEntity(fields: ['email'], message'Cette adresse email est déjà utilisée.')]
  15. #[UniqueEntity(fields: ['phone'], message'Ce numéro de téléphone est déjà utilisé.')]
  16. class User implements UserInterfacePasswordAuthenticatedUserInterface
  17. {
  18.     CONST GOD_ADMIN "ROLE_GOD_ADMIN";
  19.     CONST ADMIN "ROLE_ADMIN";
  20.     CONST COMPTABLE "ROLE_COMPTABLE";
  21.     CONST TENANT "ROLE_TENANT";
  22.     CONST SUPER_AGENT ="ROLE_SUPER_AGENT";
  23.     CONST LESSOR "ROLE_LESSOR";
  24.     CONST AGENT "ROLE_AGENT";
  25.     CONST CONSULAT "ROLE_CONSULAT";
  26.     CONST RESIDENT "ROLE_LESSOR_RESIDENT";
  27.     #[ORM\Id]
  28.     #[ORM\GeneratedValue]
  29.     #[ORM\Column]
  30.     private ?int $id null;
  31.     #[ORM\Column(length180uniquetrue)]
  32.     private ?string $email null;
  33.     #[ORM\Column]
  34.     private array $roles = [];
  35.     /**
  36.      * @var string The hashed password
  37.      */
  38.     #[ORM\Column]
  39.     private ?string $password "0";
  40.     protected $beforeRole;
  41.     #[ORM\Column(length255nullabletrue)]
  42.     private ?string $fullName null;
  43.     #[ORM\Column(length255nullabletrue)]
  44.     private ?string $phone null;
  45.     #[ORM\Column]
  46.     private ?bool $isActive false;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $firstName null;
  49.     #[ORM\Column(length255nullabletrue)]
  50.     private ?string $lastName null;
  51.     #[ORM\Column(length255nullabletrue)]
  52.     private ?string $country null;
  53.     #[ORM\Column(length255nullabletrue)]
  54.     private ?string $city null;
  55.     #[ORM\Column(length255nullabletrue)]
  56.     private ?string $company null;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $lessorType null;
  59.     #[ORM\Column]
  60.     private ?bool $registrationFinalized false;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $nationality null;
  63.     #[ORM\Column(length255nullabletrue)]
  64.     private ?string $agentType null;
  65.     #[ORM\Column(length255nullabletrue)]
  66.     private ?string $representativeName null;
  67.     #[ORM\Column(length255nullabletrue)]
  68.     private ?string $status null;
  69.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  70.     private ?\DateTimeInterface $signAt null;
  71.     #[ORM\OneToMany(mappedBy'propertyManager'targetEntityBuilding::class)]
  72.     private Collection $buildings;
  73.     #[ORM\Column(length255nullabletrue)]
  74.     private ?string $guarantorType null;
  75.     #[ORM\Column(length255nullabletrue)]
  76.     private ?string $customerType null;
  77.     #[ORM\Column(length255nullabletrue)]
  78.     private ?string $headOffice null;
  79.     #[ORM\Column(length255nullabletrue)]
  80.     private ?string $numberTva null;
  81.     #[ORM\Column(length255nullabletrue)]
  82.     private ?string $companyType null;
  83.     #[ORM\Column(length255nullabletrue)]
  84.     private ?string $street null;
  85.     #[ORM\Column(length255nullabletrue)]
  86.     private ?string $streetNumber null;
  87.     #[ORM\OneToMany(mappedBy'tenant'targetEntityBuilding::class)]
  88.     private Collection $tenantBuildings;
  89.     #[ORM\Column(length255nullabletrue)]
  90.     private ?string $adress2 null;
  91.     #[ORM\Column(length255nullabletrue)]
  92.     private ?string $adress1 null;
  93.     #[ORM\Column(length255nullabletrue)]
  94.     private ?string $lastPostalCode null;
  95.     #[ORM\Column(length255nullabletrue)]
  96.     private ?string $lastCity null;
  97.     #[ORM\Column(length255nullabletrue)]
  98.     private ?string $lastCountry null;
  99.     #[ORM\Column(length255nullabletrue)]
  100.     private ?string $visaType null;
  101.     #[ORM\Column(length255nullabletrue)]
  102.     private ?string $postalCode null;
  103.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  104.     private ?\DateTimeInterface $birthDate null;
  105.     #[ORM\Column(length255nullabletrue)]
  106.     private ?string $civility null;
  107.     #[ORM\Column(length255nullabletrue)]
  108.     private ?string $schoolName null;
  109.     #[ORM\OneToMany(mappedBy'tenant'targetEntityRentalHistory::class)]
  110.     private Collection $rentalHistories;
  111.     #[ORM\OneToMany(mappedBy'agent'targetEntityAgentCountryCovered::class, cascade: ['persist''remove'])]
  112.     private Collection $agentCountryCovereds;
  113.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'managed')]
  114.     private ?self $managedBy null;
  115.     #[ORM\OneToMany(mappedBy'managedBy'targetEntityself::class)]
  116.     private Collection $managed;
  117.     #[ORM\ManyToOne(targetEntityself::class, inversedBy'teamWithAgent')]
  118.     private ?self $teamWith;
  119.     #[ORM\OneToMany(mappedBy'teamWith'targetEntityself::class)]
  120.     private Collection $teamWithAgent;
  121.     #[ORM\OneToMany(mappedBy'user'targetEntityDocument::class,cascade: ['persist''remove'])]
  122.     private Collection $documents;
  123.     #[ORM\OneToMany(mappedBy'user'targetEntityBuildingReportingHistory::class)]
  124.     private Collection $buildingReportingHistoriesUser;
  125.     #[ORM\OneToMany(mappedBy'user'targetEntityRefusedVisa::class)]
  126.     private Collection $refusedVisas;
  127.     #[ORM\OneToMany(mappedBy'user'targetEntityHousingCertificate::class)]
  128.     private Collection $housingCertificates;
  129.     #[ORM\OneToMany(mappedBy'tenant'targetEntityBuildingFolder::class)]
  130.     private Collection $buildingFolders;
  131.     #[ORM\OneToMany(mappedBy'administrator'targetEntityResidence::class)]
  132.     private Collection $residences;
  133.     #[ORM\Column(length255nullabletrue)]
  134.     private ?string $nameLegal null;
  135.     #[ORM\Column(length255nullabletrue)]
  136.     private ?string $firstNameLegal null;
  137.     #[ORM\Column(length255nullabletrue)]
  138.     private ?string $phoneLegal null;
  139.     #[ORM\Column(length255nullabletrue)]
  140.     private ?string $emailLegal null;
  141.     #[ORM\Column(length255nullabletrue)]
  142.     private ?string $activity null;
  143.     #[ORM\OneToMany(mappedBy'requester'targetEntityWantedVisio::class)]
  144.     private Collection $wantedVisios;
  145.     #[ORM\OneToMany(mappedBy'user'targetEntityLikedBuilding::class)]
  146.     private Collection $likedBuildings;
  147.     #[ORM\Column]
  148.     private ?bool $firstLease true;
  149.     #[ORM\Column]
  150.     private ?bool $commercialMail =false;
  151.     #[ORM\Column(nullabletrue)]
  152.     private ?int $packAttestation null;
  153.     #[ORM\Column(length255nullabletrue)]
  154.     private ?string $agentEnderControl =null;
  155.     #[ORM\Column(length255nullabletrue)]
  156.     private ?string $consulatCountry null;
  157.     public function __construct()
  158.     {
  159.         $this->buildings = new ArrayCollection();
  160.         $this->tenantBuildings = new ArrayCollection();
  161.         $this->rentalHistories = new ArrayCollection();
  162.         $this->agentCountryCovereds = new ArrayCollection();
  163.         $this->managed = new ArrayCollection();
  164.         $this->teamWithAgent = new ArrayCollection();
  165.         $this->documents = new ArrayCollection();
  166.         $this->buildingReportingHistoriesUser = new ArrayCollection();
  167.         $this->refusedVisas = new ArrayCollection();
  168.         $this->housingCertificates = new ArrayCollection();
  169.         $this->buildingFolders = new ArrayCollection();
  170.         $this->residences = new ArrayCollection();
  171.         $this->wantedVisios = new ArrayCollection();
  172.         $this->likedBuildings = new ArrayCollection();
  173.         $this->setFirstLease(true);
  174.     }
  175.     public function __toString(): string
  176.     {
  177.         return $this->getLastName() . " " $this->getFirstName();
  178.     }
  179.     public function getId(): ?int
  180.     {
  181.         return $this->id;
  182.     }
  183.     public function getCommercialMail(): ?bool
  184.     {
  185.         return $this->commercialMail;
  186.     }
  187.     public function setCommercialMail(bool $commercialMail): self
  188.     {
  189.         $this->commercialMail $commercialMail;
  190.         return $this;
  191.     }
  192.     
  193.     public function getFirstLease(): ?bool
  194.     {
  195.         return $this->firstLease;
  196.     }
  197.     public function setFirstLease(bool $firstLease): self
  198.     {
  199.         $this->firstLease $firstLease;
  200.         return $this;
  201.     }
  202.     public function getEmail(): ?string
  203.     {
  204.         return $this->email;
  205.     }
  206.     public function setEmail(string $email): self
  207.     {
  208.         $this->email $email;
  209.         return $this;
  210.     }
  211.     /**
  212.      * A visual identifier that represents this user.
  213.      *
  214.      * @see UserInterface
  215.      */
  216.     public function getUserIdentifier(): string
  217.     {
  218.         return (string) $this->email;
  219.     }
  220.     /**
  221.      * @see UserInterface
  222.      */
  223.     public function getRoles(): array
  224.     {
  225.         $roles $this->roles;
  226.         // guarantee every user at least has ROLE_USER
  227.         $roles[] = 'ROLE_USER';
  228.         return array_unique($roles);
  229.     }
  230.     public function setRoles(array $roles): self
  231.     {
  232.         $this->roles $roles;
  233.         return $this;
  234.     }
  235.     public function asRole(string $role): bool
  236.     {
  237.         if (in_array($role$this->getRoles(), true)) {
  238.             return true;
  239.         } else {
  240.             return false;
  241.         }
  242.     }
  243.     /**
  244.      * @see PasswordAuthenticatedUserInterface
  245.      */
  246.     public function getPassword(): string
  247.     {
  248.         return $this->password;
  249.     }
  250.     public function setPassword(string $password): self
  251.     {
  252.         $this->password $password;
  253.         return $this;
  254.     }
  255.     /**
  256.      * @see UserInterface
  257.      */
  258.     public function eraseCredentials()
  259.     {
  260.         // If you store any temporary, sensitive data on the user, clear it here
  261.         // $this->plainPassword = null;
  262.     }
  263.     /**
  264.      * @return mixed
  265.      */
  266.     public function getBeforeRole()
  267.     {
  268.         return $this->beforeRole;
  269.     }
  270.     /**
  271.      * @param mixed $beforeRole
  272.      */
  273.     public function setBeforeRole($beforeRole): void
  274.     {
  275.         $this->beforeRole $beforeRole;
  276.     }
  277.     public function getFullName(): ?string
  278.     {
  279.         return $this->fullName;
  280.     }
  281.     public function setFullName(?string $fullName): self
  282.     {
  283.         $this->fullName $fullName;
  284.         return $this;
  285.     }
  286.     public function getPhone(): ?string
  287.     {
  288.         return $this->phone;
  289.     }
  290.     public function setPhone(?string $phone): self
  291.     {
  292.         $this->phone $phone;
  293.         return $this;
  294.     }
  295.     public function isIsActive(): ?bool
  296.     {
  297.         return $this->isActive;
  298.     }
  299.     public function setIsActive(bool $isActive): self
  300.     {
  301.         $this->isActive $isActive;
  302.         return $this;
  303.     }
  304.     public function getFirstName(): ?string
  305.     {
  306.         return $this->firstName;
  307.     }
  308.     public function setFirstName(?string $firstName): self
  309.     {
  310.         $this->firstName $firstName;
  311.         return $this;
  312.     }
  313.     public function getLastName(): ?string
  314.     {
  315.         return $this->lastName;
  316.     }
  317.     public function setLastName(?string $lastName): self
  318.     {
  319.         $this->lastName $lastName;
  320.         return $this;
  321.     }
  322.     public function getCountry(): ?string
  323.     {
  324.         return $this->country;
  325.     }
  326.     public function setCountry(?string $country): self
  327.     {
  328.         $this->country $country;
  329.         return $this;
  330.     }
  331.     public function getCity(): ?string
  332.     {
  333.         return $this->city;
  334.     }
  335.     public function setCity(?string $city): self
  336.     {
  337.         $this->city $city;
  338.         return $this;
  339.     }
  340.     public function getCompany(): ?string
  341.     {
  342.         return $this->company;
  343.     }
  344.     public function setCompany(?string $company): self
  345.     {
  346.         $this->company $company;
  347.         return $this;
  348.     }
  349.     public function getLessorType(): ?string
  350.     {
  351.         return $this->lessorType;
  352.     }
  353.     public function setLessorType(?string $lessorType): self
  354.     {
  355.         $this->lessorType $lessorType;
  356.         return $this;
  357.     }
  358.     public function isRegistrationFinalized(): ?bool
  359.     {
  360.         return $this->registrationFinalized;
  361.     }
  362.     public function setRegistrationFinalized(bool $registrationFinalized): self
  363.     {
  364.         $this->registrationFinalized $registrationFinalized;
  365.         return $this;
  366.     }
  367.     public function getNationality(): ?string
  368.     {
  369.         return $this->nationality;
  370.     }
  371.     public function setNationality(?string $nationality): self
  372.     {
  373.         $this->nationality $nationality;
  374.         return $this;
  375.     }
  376.     public function getAgentType(): ?string
  377.     {
  378.         return $this->agentType;
  379.     }
  380.     public function setAgentType(?string $agentType): self
  381.     {
  382.         $this->agentType $agentType;
  383.         return $this;
  384.     }
  385.     public function getRepresentativeName(): ?string
  386.     {
  387.         return $this->representativeName;
  388.     }
  389.     public function setRepresentativeName(?string $representativeName): self
  390.     {
  391.         $this->representativeName $representativeName;
  392.         return $this;
  393.     }
  394.     public function getStatus(): ?string
  395.     {
  396.         return $this->status;
  397.     }
  398.     public function setStatus(?string $status): self
  399.     {
  400.         $this->status $status;
  401.         return $this;
  402.     }
  403.     public function getSignAt(): ?\DateTimeInterface
  404.     {
  405.         return $this->signAt;
  406.     }
  407.     public function setSignAt(?\DateTimeInterface $signAt): self
  408.     {
  409.         $this->signAt $signAt;
  410.         return $this;
  411.     }
  412.     /**
  413.      * @return Collection<int, Building>
  414.      */
  415.     public function getBuildings(): Collection
  416.     {
  417.         return $this->buildings;
  418.     }
  419.     public function addBuilding(Building $building): self
  420.     {
  421.         if (!$this->buildings->contains($building)) {
  422.             $this->buildings->add($building);
  423.             $building->setPropertyManager($this);
  424.         }
  425.         return $this;
  426.     }
  427.     public function removeBuilding(Building $building): self
  428.     {
  429.         if ($this->buildings->removeElement($building)) {
  430.             // set the owning side to null (unless already changed)
  431.             if ($building->getPropertyManager() === $this) {
  432.                 $building->setPropertyManager(null);
  433.             }
  434.         }
  435.         return $this;
  436.     }
  437.     public function getGuarantorType(): ?string
  438.     {
  439.         return $this->guarantorType;
  440.     }
  441.     public function setGuarantorType(?string $guarantorType): self
  442.     {
  443.         $this->guarantorType $guarantorType;
  444.         return $this;
  445.     }
  446.     public function getCustomerType(): ?string
  447.     {
  448.         return $this->customerType;
  449.     }
  450.     public function setCustomerType(?string $customerType): self
  451.     {
  452.         $this->customerType $customerType;
  453.         return $this;
  454.     }
  455.     public function getHeadOffice(): ?string
  456.     {
  457.         return $this->headOffice;
  458.     }
  459.     public function setHeadOffice(string $headOffice): self
  460.     {
  461.         $this->headOffice $headOffice;
  462.         return $this;
  463.     }
  464.     public function getNumberTva(): ?string
  465.     {
  466.         return $this->numberTva;
  467.     }
  468.     public function setNumberTva(?string $numberTva): self
  469.     {
  470.         $this->numberTva $numberTva;
  471.         return $this;
  472.     }
  473.     public function getCompanyType(): ?string
  474.     {
  475.         return $this->companyType;
  476.     }
  477.     public function setCompanyType(?string $companyType): self
  478.     {
  479.         $this->companyType $companyType;
  480.         return $this;
  481.     }
  482.     public function getStreet(): ?string
  483.     {
  484.         return $this->street;
  485.     }
  486.     public function setStreet(?string $street): self
  487.     {
  488.         $this->street $street;
  489.         return $this;
  490.     }
  491.     public function getStreetNumber(): ?string
  492.     {
  493.         return $this->streetNumber;
  494.     }
  495.     public function setStreetNumber(?string $streetNumber): self
  496.     {
  497.         $this->streetNumber $streetNumber;
  498.         return $this;
  499.     }
  500.     /**
  501.      * @return Collection<int, Building>
  502.      */
  503.     public function getTenantBuildings(): Collection
  504.     {
  505.         return $this->tenantBuildings;
  506.     }
  507.     public function addTenantBuilding(Building $tenantBuilding): self
  508.     {
  509.         if (!$this->tenantBuildings->contains($tenantBuilding)) {
  510.             $this->tenantBuildings->add($tenantBuilding);
  511.             $tenantBuilding->setTenant($this);
  512.         }
  513.         return $this;
  514.     }
  515.     public function removeTenantBuilding(Building $tenantBuilding): self
  516.     {
  517.         if ($this->tenantBuildings->removeElement($tenantBuilding)) {
  518.             // set the owning side to null (unless already changed)
  519.             if ($tenantBuilding->getTenant() === $this) {
  520.                 $tenantBuilding->setTenant(null);
  521.             }
  522.         }
  523.         return $this;
  524.     }
  525.     public function getAdress2(): ?string
  526.     {
  527.         return $this->adress2;
  528.     }
  529.     public function setAdress2(?string $adress2): self
  530.     {
  531.         $this->adress2 $adress2;
  532.         return $this;
  533.     }
  534.     public function getAdress1(): ?string
  535.     {
  536.         return $this->adress1;
  537.     }
  538.     public function setAdress1(?string $adress1): self
  539.     {
  540.         $this->adress1 $adress1;
  541.         return $this;
  542.     }
  543.     public function getLastPostalCode(): ?string
  544.     {
  545.         return $this->lastPostalCode;
  546.     }
  547.     public function setLastPostalCode(?string $lastPostalCode): self
  548.     {
  549.         $this->lastPostalCode $lastPostalCode;
  550.         return $this;
  551.     }
  552.     public function getLastCity(): ?string
  553.     {
  554.         return $this->lastCity;
  555.     }
  556.     public function setLastCity(?string $lastCity): self
  557.     {
  558.         $this->lastCity $lastCity;
  559.         return $this;
  560.     }
  561.     public function getLastCountry(): ?string
  562.     {
  563.         return $this->lastCountry;
  564.     }
  565.     public function setLastCountry(?string $lastCountry): self
  566.     {
  567.         $this->lastCountry $lastCountry;
  568.         return $this;
  569.     }
  570.     public function getVisaType(): ?string
  571.     {
  572.         return $this->visaType;
  573.     }
  574.     public function setVisaType(?string $visaType): self
  575.     {
  576.         $this->visaType $visaType;
  577.         return $this;
  578.     }
  579.     public function getPostalCode(): ?string
  580.     {
  581.         return $this->postalCode;
  582.     }
  583.     public function setPostalCode(?string $postalCode): self
  584.     {
  585.         $this->postalCode $postalCode;
  586.         return $this;
  587.     }
  588.     public function getBirthDate(): ?\DateTimeInterface
  589.     {
  590.         return $this->birthDate;
  591.     }
  592.     public function setBirthDate(?\DateTimeInterface $birthDate): self
  593.     {
  594.         $this->birthDate $birthDate;
  595.         return $this;
  596.     }
  597.     public function getCivility(): ?string
  598.     {
  599.         return $this->civility;
  600.     }
  601.     public function setCivility(?string $civility): self
  602.     {
  603.         $this->civility $civility;
  604.         return $this;
  605.     }
  606.     public function getSchoolName(): ?string
  607.     {
  608.         return $this->schoolName;
  609.     }
  610.     public function setSchoolName(?string $schoolName): self
  611.     {
  612.         $this->schoolName $schoolName;
  613.         return $this;
  614.     }
  615.     /**
  616.      * @return Collection<int, RentalHistory>
  617.      */
  618.     public function getRentalHistories(): Collection
  619.     {
  620.         return $this->rentalHistories;
  621.     }
  622.     public function addRentalHistory(RentalHistory $rentalHistory): self
  623.     {
  624.         if (!$this->rentalHistories->contains($rentalHistory)) {
  625.             $this->rentalHistories->add($rentalHistory);
  626.             $rentalHistory->setTenant($this);
  627.         }
  628.         return $this;
  629.     }
  630.     public function removeRentalHistory(RentalHistory $rentalHistory): self
  631.     {
  632.         if ($this->rentalHistories->removeElement($rentalHistory)) {
  633.             // set the owning side to null (unless already changed)
  634.             if ($rentalHistory->getTenant() === $this) {
  635.                 $rentalHistory->setTenant(null);
  636.             }
  637.         }
  638.         return $this;
  639.     }
  640.     /**
  641.      * @return Collection<int, AgentCountryCovered>
  642.      */
  643.     public function getAgentCountryCovereds(): Collection
  644.     {
  645.         return $this->agentCountryCovereds;
  646.     }
  647.     public function addAgentCountryCovered(AgentCountryCovered $agentCountryCovered): self
  648.     {
  649.         if (!$this->agentCountryCovereds->contains($agentCountryCovered)) {
  650.             $this->agentCountryCovereds->add($agentCountryCovered);
  651.             $agentCountryCovered->setAgent($this);
  652.         }
  653.         return $this;
  654.     }
  655.     public function removeAgentCountryCovered(AgentCountryCovered $agentCountryCovered): self
  656.     {
  657.         if ($this->agentCountryCovereds->removeElement($agentCountryCovered)) {
  658.             // set the owning side to null (unless already changed)
  659.             if ($agentCountryCovered->getAgent() === $this) {
  660.                 $agentCountryCovered->setAgent(null);
  661.             }
  662.         }
  663.         return $this;
  664.     }
  665.     public function getManagedBy(): ?self
  666.     {
  667.         return $this->managedBy;
  668.     }
  669.     public function setManagedBy(?self $managedBy): self
  670.     {
  671.         $this->managedBy $managedBy;
  672.         return $this;
  673.     }
  674.     /**
  675.      * @return Collection<int, self>
  676.      */
  677.     public function getManaged(): Collection
  678.     {
  679.         return $this->managed;
  680.     }
  681.     public function addManaged(self $managed): self
  682.     {
  683.         if (!$this->managed->contains($managed)) {
  684.             $this->managed->add($managed);
  685.             $managed->setManagedBy($this);
  686.         }
  687.         return $this;
  688.     }
  689.     public function removeManaged(self $managed): self
  690.     {
  691.         if ($this->managed->removeElement($managed)) {
  692.             // set the owning side to null (unless already changed)
  693.             if ($managed->getManagedBy() === $this) {
  694.                 $managed->setManagedBy(null);
  695.             }
  696.         }
  697.         return $this;
  698.     }
  699.     public function getTeamWith(): ?self
  700.     {
  701.         return $this->teamWith;
  702.     }
  703.     public function setTeamWith(?self $teamWith): self
  704.     {
  705.         $this->teamWith $teamWith;
  706.         return $this;
  707.     }
  708.     /**
  709.      * @return Collection<int, self>
  710.      */
  711.     public function getTeamWithAgent(): Collection
  712.     {
  713.         return $this->teamWithAgent;
  714.     }
  715.     public function addTeamWithAgent(self $teamWithAgent): self
  716.     {
  717.         if (!$this->teamWithAgent->contains($teamWithAgent)) {
  718.             $this->teamWithAgent->add($teamWithAgent);
  719.             $teamWithAgent->setTeamWith($this);
  720.         }
  721.         return $this;
  722.     }
  723.     public function removeTeamWithAgent(self $teamWithAgent): self
  724.     {
  725.         if ($this->teamWithAgent->removeElement($teamWithAgent)) {
  726.             // set the owning side to null (unless already changed)
  727.             if ($teamWithAgent->getTeamWith() === $this) {
  728.                 $teamWithAgent->setTeamWith(null);
  729.             }
  730.         }
  731.         return $this;
  732.     }
  733.     /**
  734.      * @return Collection<int, Document>
  735.      */
  736.     public function getDocuments(): Collection
  737.     {
  738.         return $this->documents;
  739.     }
  740.     public function addDocument(Document $document): self
  741.     {
  742.         if (!$this->documents->contains($document)) {
  743.             $this->documents->add($document);
  744.             $document->setUser($this);
  745.         }
  746.         return $this;
  747.     }
  748.     public function removeDocument(Document $document): self
  749.     {
  750.         if ($this->documents->removeElement($document)) {
  751.             // set the owning side to null (unless already changed)
  752.             if ($document->getUser() === $this) {
  753.                 $document->setUser(null);
  754.             }
  755.         }
  756.         return $this;
  757.     }
  758.     /**
  759.      * @return Collection<int, BuildingReportingHistory>
  760.      */
  761.     public function getBuildingReportingHistoriesUser(): Collection
  762.     {
  763.         return $this->buildingReportingHistoriesUser;
  764.     }
  765.     public function addBuildingReportingHistory(BuildingReportingHistory $buildingReportingHistoriesUser): self
  766.     {
  767.         if (!$this->buildingReportingHistoriesUser->contains($buildingReportingHistoriesUser)) {
  768.             $this->buildingReportingHistoriesUser->add($buildingReportingHistoriesUser);
  769.             $buildingReportingHistoriesUser->setUser($this);
  770.         }
  771.         return $this;
  772.     }
  773.     public function removeBuildingReportingHistory(BuildingReportingHistory $buildingReportingHistoriesUser): self
  774.     {
  775.         if ($this->buildingReportingHistoriesUser->removeElement($buildingReportingHistoriesUser)) {
  776.             // set the owning side to null (unless already changed)
  777.             if ($buildingReportingHistoriesUser->getUser() === $this) {
  778.                 $buildingReportingHistoriesUser->setUser(null);
  779.             }
  780.         }
  781.         return $this;
  782.     }
  783.     /**
  784.      * @return Collection<int, RefusedVisa>
  785.      */
  786.     public function getRefusedVisas(): Collection
  787.     {
  788.         return $this->refusedVisas;
  789.     }
  790.     public function addRefusedVisa(RefusedVisa $refusedVisa): self
  791.     {
  792.         if (!$this->refusedVisas->contains($refusedVisa)) {
  793.             $this->refusedVisas->add($refusedVisa);
  794.             $refusedVisa->setUser($this);
  795.         }
  796.         return $this;
  797.     }
  798.     public function removeRefusedVisa(RefusedVisa $refusedVisa): self
  799.     {
  800.         if ($this->refusedVisas->removeElement($refusedVisa)) {
  801.             // set the owning side to null (unless already changed)
  802.             if ($refusedVisa->getUser() === $this) {
  803.                 $refusedVisa->setUser(null);
  804.             }
  805.         }
  806.         return $this;
  807.     }
  808.     /**
  809.      * @return Collection<int, HousingCertificate>
  810.      */
  811.     public function getHousingCertificates(): Collection
  812.     {
  813.         return $this->housingCertificates;
  814.     }
  815.     public function addHousingCertificate(HousingCertificate $housingCertificate): self
  816.     {
  817.         if (!$this->housingCertificates->contains($housingCertificate)) {
  818.             $this->housingCertificates->add($housingCertificate);
  819.             $housingCertificate->setUser($this);
  820.         }
  821.         return $this;
  822.     }
  823.     public function removeHousingCertificate(HousingCertificate $housingCertificate): self
  824.     {
  825.         if ($this->housingCertificates->removeElement($housingCertificate)) {
  826.             // set the owning side to null (unless already changed)
  827.             if ($housingCertificate->getUser() === $this) {
  828.                 $housingCertificate->setUser(null);
  829.             }
  830.         }
  831.         return $this;
  832.     }
  833.     /**
  834.      * @return Collection<int, BuildingFolder>
  835.      */
  836.     public function getBuildingFolders(): Collection
  837.     {
  838.         return $this->buildingFolders;
  839.     }
  840.     public function addBuildingFolder(BuildingFolder $buildingFolder): self
  841.     {
  842.         if (!$this->buildingFolders->contains($buildingFolder)) {
  843.             $this->buildingFolders->add($buildingFolder);
  844.             $buildingFolder->setTenant($this);
  845.         }
  846.         return $this;
  847.     }
  848.     public function removeBuildingFolder(BuildingFolder $buildingFolder): self
  849.     {
  850.         if ($this->buildingFolders->removeElement($buildingFolder)) {
  851.             // set the owning side to null (unless already changed)
  852.             if ($buildingFolder->getTenant() === $this) {
  853.                 $buildingFolder->setTenant(null);
  854.             }
  855.         }
  856.         return $this;
  857.     }
  858.     /**
  859.      * @return Collection<int, Residence>
  860.      */
  861.     public function getResidences(): Collection
  862.     {
  863.         return $this->residences;
  864.     }
  865.     public function addResidence(Residence $residence): self
  866.     {
  867.         if (!$this->residences->contains($residence)) {
  868.             $this->residences->add($residence);
  869.             $residence->setAdministrator($this);
  870.         }
  871.         return $this;
  872.     }
  873.     public function removeResidence(Residence $residence): self
  874.     {
  875.         if ($this->residences->removeElement($residence)) {
  876.             // set the owning side to null (unless already changed)
  877.             if ($residence->getAdministrator() === $this) {
  878.                 $residence->setAdministrator(null);
  879.             }
  880.         }
  881.         return $this;
  882.     }
  883.     public function getNameLegal(): ?string
  884.     {
  885.         return $this->nameLegal;
  886.     }
  887.     public function setNameLegal(?string $nameLegal): self
  888.     {
  889.         $this->nameLegal $nameLegal;
  890.         return $this;
  891.     }
  892.     public function getFirstNameLegal(): ?string
  893.     {
  894.         return $this->firstNameLegal;
  895.     }
  896.     public function setFirstNameLegal(?string $firstNameLegal): self
  897.     {
  898.         $this->firstNameLegal $firstNameLegal;
  899.         return $this;
  900.     }
  901.     public function getPhoneLegal(): ?string
  902.     {
  903.         return $this->phoneLegal;
  904.     }
  905.     public function setPhoneLegal(?string $phoneLegal): self
  906.     {
  907.         $this->phoneLegal $phoneLegal;
  908.         return $this;
  909.     }
  910.     public function getEmailLegal(): ?string
  911.     {
  912.         return $this->emailLegal;
  913.     }
  914.     public function setEmailLegal(?string $emailLegal): self
  915.     {
  916.         $this->emailLegal $emailLegal;
  917.         return $this;
  918.     }
  919.     public function getActivity(): ?string
  920.     {
  921.         return $this->activity;
  922.     }
  923.     public function setActivity(?string $activity): self
  924.     {
  925.         $this->activity $activity;
  926.         return $this;
  927.     }
  928.     /**
  929.      * @return Collection<int, WantedVisio>
  930.      */
  931.     public function getWantedVisios(): Collection
  932.     {
  933.         return $this->wantedVisios;
  934.     }
  935.     public function addWantedVisio(WantedVisio $wantedVisio): self
  936.     {
  937.         if (!$this->wantedVisios->contains($wantedVisio)) {
  938.             $this->wantedVisios->add($wantedVisio);
  939.             $wantedVisio->setRequester($this);
  940.         }
  941.         return $this;
  942.     }
  943.     public function removeWantedVisio(WantedVisio $wantedVisio): self
  944.     {
  945.         if ($this->wantedVisios->removeElement($wantedVisio)) {
  946.             // set the owning side to null (unless already changed)
  947.             if ($wantedVisio->getRequester() === $this) {
  948.                 $wantedVisio->setRequester(null);
  949.             }
  950.         }
  951.         return $this;
  952.     }
  953.     /**
  954.      * @return Collection<int, LikedBuilding>
  955.      */
  956.     public function getLikedBuildings(): Collection
  957.     {
  958.         return $this->likedBuildings;
  959.     }
  960.     public function addLikedBuilding(LikedBuilding $likedBuilding): self
  961.     {
  962.         if (!$this->likedBuildings->contains($likedBuilding)) {
  963.             $this->likedBuildings->add($likedBuilding);
  964.             $likedBuilding->setUser($this);
  965.         }
  966.         return $this;
  967.     }
  968.     public function removeLikedBuilding(LikedBuilding $likedBuilding): self
  969.     {
  970.         if ($this->likedBuildings->removeElement($likedBuilding)) {
  971.             // set the owning side to null (unless already changed)
  972.             if ($likedBuilding->getUser() === $this) {
  973.                 $likedBuilding->setUser(null);
  974.             }
  975.         }
  976.         return $this;
  977.     }
  978.     public function getPackAttestation(): ?int
  979.     {
  980.         return $this->packAttestation;
  981.     }
  982.     public function setPackAttestation(int $packAttestation): static
  983.     {
  984.         $this->packAttestation $packAttestation;
  985.         return $this;
  986.     }
  987.     public function getAgentEnderControl(): ?string
  988.     {
  989.         return $this->agentEnderControl;
  990.     }
  991.     public function setAgentEnderControl(?string $agentEnderControl): static
  992.     {
  993.         $this->agentEnderControl $agentEnderControl;
  994.         return $this;
  995.     }
  996.     public function getConsulatCountry(): ?string
  997.     {
  998.         return $this->consulatCountry;
  999.     }
  1000.     public function setConsulatCountry(?string $consulatCountry): static
  1001.     {
  1002.         $this->consulatCountry $consulatCountry;
  1003.         return $this;
  1004.     }
  1005. }