src/Entity/User.php line 20
<?php
namespace App\Entity;
use App\Repository\UserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Entity(repositoryClass: UserRepository::class)]
#[ORM\Table(name: '`user`')]
#[UniqueEntity(fields: ['email'], message: 'Cette adresse email est déjà utilisée.')]
#[UniqueEntity(fields: ['phone'], message: 'Ce numéro de téléphone est déjà utilisé.')]
class User implements UserInterface, PasswordAuthenticatedUserInterface
{
CONST GOD_ADMIN = "ROLE_GOD_ADMIN";
CONST ADMIN = "ROLE_ADMIN";
CONST COMPTABLE = "ROLE_COMPTABLE";
CONST TENANT = "ROLE_TENANT";
CONST SUPER_AGENT ="ROLE_SUPER_AGENT";
CONST LESSOR = "ROLE_LESSOR";
CONST AGENT = "ROLE_AGENT";
CONST CONSULAT = "ROLE_CONSULAT";
CONST RESIDENT = "ROLE_LESSOR_RESIDENT";
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 180, unique: true)]
private ?string $email = null;
#[ORM\Column]
private array $roles = [];
/**
* @var string The hashed password
*/
#[ORM\Column]
private ?string $password = "0";
protected $beforeRole;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fullName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $phone = null;
#[ORM\Column]
private ?bool $isActive = false;
#[ORM\Column(length: 255, nullable: true)]
private ?string $firstName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lastName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $country = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $city = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $company = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lessorType = null;
#[ORM\Column]
private ?bool $registrationFinalized = false;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nationality = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $agentType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $representativeName = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $status = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $signAt = null;
#[ORM\OneToMany(mappedBy: 'propertyManager', targetEntity: Building::class)]
private Collection $buildings;
#[ORM\Column(length: 255, nullable: true)]
private ?string $guarantorType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $customerType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $headOffice = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $numberTva = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $companyType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $street = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $streetNumber = null;
#[ORM\OneToMany(mappedBy: 'tenant', targetEntity: Building::class)]
private Collection $tenantBuildings;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adress2 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adress1 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lastPostalCode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lastCity = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $lastCountry = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $visaType = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $postalCode = null;
#[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)]
private ?\DateTimeInterface $birthDate = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $civility = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $schoolName = null;
#[ORM\OneToMany(mappedBy: 'tenant', targetEntity: RentalHistory::class)]
private Collection $rentalHistories;
#[ORM\OneToMany(mappedBy: 'agent', targetEntity: AgentCountryCovered::class, cascade: ['persist', 'remove'])]
private Collection $agentCountryCovereds;
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'managed')]
private ?self $managedBy = null;
#[ORM\OneToMany(mappedBy: 'managedBy', targetEntity: self::class)]
private Collection $managed;
#[ORM\ManyToOne(targetEntity: self::class, inversedBy: 'teamWithAgent')]
private ?self $teamWith;
#[ORM\OneToMany(mappedBy: 'teamWith', targetEntity: self::class)]
private Collection $teamWithAgent;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: Document::class,cascade: ['persist', 'remove'])]
private Collection $documents;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: BuildingReportingHistory::class)]
private Collection $buildingReportingHistoriesUser;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: RefusedVisa::class)]
private Collection $refusedVisas;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: HousingCertificate::class)]
private Collection $housingCertificates;
#[ORM\OneToMany(mappedBy: 'tenant', targetEntity: BuildingFolder::class)]
private Collection $buildingFolders;
#[ORM\OneToMany(mappedBy: 'administrator', targetEntity: Residence::class)]
private Collection $residences;
#[ORM\Column(length: 255, nullable: true)]
private ?string $nameLegal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $firstNameLegal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $phoneLegal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $emailLegal = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $activity = null;
#[ORM\OneToMany(mappedBy: 'requester', targetEntity: WantedVisio::class)]
private Collection $wantedVisios;
#[ORM\OneToMany(mappedBy: 'user', targetEntity: LikedBuilding::class)]
private Collection $likedBuildings;
#[ORM\Column]
private ?bool $firstLease = true;
#[ORM\Column]
private ?bool $commercialMail =false;
#[ORM\Column(nullable: true)]
private ?int $packAttestation = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $agentEnderControl =null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $consulatCountry = null;
public function __construct()
{
$this->buildings = new ArrayCollection();
$this->tenantBuildings = new ArrayCollection();
$this->rentalHistories = new ArrayCollection();
$this->agentCountryCovereds = new ArrayCollection();
$this->managed = new ArrayCollection();
$this->teamWithAgent = new ArrayCollection();
$this->documents = new ArrayCollection();
$this->buildingReportingHistoriesUser = new ArrayCollection();
$this->refusedVisas = new ArrayCollection();
$this->housingCertificates = new ArrayCollection();
$this->buildingFolders = new ArrayCollection();
$this->residences = new ArrayCollection();
$this->wantedVisios = new ArrayCollection();
$this->likedBuildings = new ArrayCollection();
$this->setFirstLease(true);
}
public function __toString(): string
{
return $this->getLastName() . " " . $this->getFirstName();
}
public function getId(): ?int
{
return $this->id;
}
public function getCommercialMail(): ?bool
{
return $this->commercialMail;
}
public function setCommercialMail(bool $commercialMail): self
{
$this->commercialMail = $commercialMail;
return $this;
}
public function getFirstLease(): ?bool
{
return $this->firstLease;
}
public function setFirstLease(bool $firstLease): self
{
$this->firstLease = $firstLease;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(string $email): self
{
$this->email = $email;
return $this;
}
/**
* A visual identifier that represents this user.
*
* @see UserInterface
*/
public function getUserIdentifier(): string
{
return (string) $this->email;
}
/**
* @see UserInterface
*/
public function getRoles(): array
{
$roles = $this->roles;
// guarantee every user at least has ROLE_USER
$roles[] = 'ROLE_USER';
return array_unique($roles);
}
public function setRoles(array $roles): self
{
$this->roles = $roles;
return $this;
}
public function asRole(string $role): bool
{
if (in_array($role, $this->getRoles(), true)) {
return true;
} else {
return false;
}
}
/**
* @see PasswordAuthenticatedUserInterface
*/
public function getPassword(): string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
/**
* @see UserInterface
*/
public function eraseCredentials()
{
// If you store any temporary, sensitive data on the user, clear it here
// $this->plainPassword = null;
}
/**
* @return mixed
*/
public function getBeforeRole()
{
return $this->beforeRole;
}
/**
* @param mixed $beforeRole
*/
public function setBeforeRole($beforeRole): void
{
$this->beforeRole = $beforeRole;
}
public function getFullName(): ?string
{
return $this->fullName;
}
public function setFullName(?string $fullName): self
{
$this->fullName = $fullName;
return $this;
}
public function getPhone(): ?string
{
return $this->phone;
}
public function setPhone(?string $phone): self
{
$this->phone = $phone;
return $this;
}
public function isIsActive(): ?bool
{
return $this->isActive;
}
public function setIsActive(bool $isActive): self
{
$this->isActive = $isActive;
return $this;
}
public function getFirstName(): ?string
{
return $this->firstName;
}
public function setFirstName(?string $firstName): self
{
$this->firstName = $firstName;
return $this;
}
public function getLastName(): ?string
{
return $this->lastName;
}
public function setLastName(?string $lastName): self
{
$this->lastName = $lastName;
return $this;
}
public function getCountry(): ?string
{
return $this->country;
}
public function setCountry(?string $country): self
{
$this->country = $country;
return $this;
}
public function getCity(): ?string
{
return $this->city;
}
public function setCity(?string $city): self
{
$this->city = $city;
return $this;
}
public function getCompany(): ?string
{
return $this->company;
}
public function setCompany(?string $company): self
{
$this->company = $company;
return $this;
}
public function getLessorType(): ?string
{
return $this->lessorType;
}
public function setLessorType(?string $lessorType): self
{
$this->lessorType = $lessorType;
return $this;
}
public function isRegistrationFinalized(): ?bool
{
return $this->registrationFinalized;
}
public function setRegistrationFinalized(bool $registrationFinalized): self
{
$this->registrationFinalized = $registrationFinalized;
return $this;
}
public function getNationality(): ?string
{
return $this->nationality;
}
public function setNationality(?string $nationality): self
{
$this->nationality = $nationality;
return $this;
}
public function getAgentType(): ?string
{
return $this->agentType;
}
public function setAgentType(?string $agentType): self
{
$this->agentType = $agentType;
return $this;
}
public function getRepresentativeName(): ?string
{
return $this->representativeName;
}
public function setRepresentativeName(?string $representativeName): self
{
$this->representativeName = $representativeName;
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(?string $status): self
{
$this->status = $status;
return $this;
}
public function getSignAt(): ?\DateTimeInterface
{
return $this->signAt;
}
public function setSignAt(?\DateTimeInterface $signAt): self
{
$this->signAt = $signAt;
return $this;
}
/**
* @return Collection<int, Building>
*/
public function getBuildings(): Collection
{
return $this->buildings;
}
public function addBuilding(Building $building): self
{
if (!$this->buildings->contains($building)) {
$this->buildings->add($building);
$building->setPropertyManager($this);
}
return $this;
}
public function removeBuilding(Building $building): self
{
if ($this->buildings->removeElement($building)) {
// set the owning side to null (unless already changed)
if ($building->getPropertyManager() === $this) {
$building->setPropertyManager(null);
}
}
return $this;
}
public function getGuarantorType(): ?string
{
return $this->guarantorType;
}
public function setGuarantorType(?string $guarantorType): self
{
$this->guarantorType = $guarantorType;
return $this;
}
public function getCustomerType(): ?string
{
return $this->customerType;
}
public function setCustomerType(?string $customerType): self
{
$this->customerType = $customerType;
return $this;
}
public function getHeadOffice(): ?string
{
return $this->headOffice;
}
public function setHeadOffice(string $headOffice): self
{
$this->headOffice = $headOffice;
return $this;
}
public function getNumberTva(): ?string
{
return $this->numberTva;
}
public function setNumberTva(?string $numberTva): self
{
$this->numberTva = $numberTva;
return $this;
}
public function getCompanyType(): ?string
{
return $this->companyType;
}
public function setCompanyType(?string $companyType): self
{
$this->companyType = $companyType;
return $this;
}
public function getStreet(): ?string
{
return $this->street;
}
public function setStreet(?string $street): self
{
$this->street = $street;
return $this;
}
public function getStreetNumber(): ?string
{
return $this->streetNumber;
}
public function setStreetNumber(?string $streetNumber): self
{
$this->streetNumber = $streetNumber;
return $this;
}
/**
* @return Collection<int, Building>
*/
public function getTenantBuildings(): Collection
{
return $this->tenantBuildings;
}
public function addTenantBuilding(Building $tenantBuilding): self
{
if (!$this->tenantBuildings->contains($tenantBuilding)) {
$this->tenantBuildings->add($tenantBuilding);
$tenantBuilding->setTenant($this);
}
return $this;
}
public function removeTenantBuilding(Building $tenantBuilding): self
{
if ($this->tenantBuildings->removeElement($tenantBuilding)) {
// set the owning side to null (unless already changed)
if ($tenantBuilding->getTenant() === $this) {
$tenantBuilding->setTenant(null);
}
}
return $this;
}
public function getAdress2(): ?string
{
return $this->adress2;
}
public function setAdress2(?string $adress2): self
{
$this->adress2 = $adress2;
return $this;
}
public function getAdress1(): ?string
{
return $this->adress1;
}
public function setAdress1(?string $adress1): self
{
$this->adress1 = $adress1;
return $this;
}
public function getLastPostalCode(): ?string
{
return $this->lastPostalCode;
}
public function setLastPostalCode(?string $lastPostalCode): self
{
$this->lastPostalCode = $lastPostalCode;
return $this;
}
public function getLastCity(): ?string
{
return $this->lastCity;
}
public function setLastCity(?string $lastCity): self
{
$this->lastCity = $lastCity;
return $this;
}
public function getLastCountry(): ?string
{
return $this->lastCountry;
}
public function setLastCountry(?string $lastCountry): self
{
$this->lastCountry = $lastCountry;
return $this;
}
public function getVisaType(): ?string
{
return $this->visaType;
}
public function setVisaType(?string $visaType): self
{
$this->visaType = $visaType;
return $this;
}
public function getPostalCode(): ?string
{
return $this->postalCode;
}
public function setPostalCode(?string $postalCode): self
{
$this->postalCode = $postalCode;
return $this;
}
public function getBirthDate(): ?\DateTimeInterface
{
return $this->birthDate;
}
public function setBirthDate(?\DateTimeInterface $birthDate): self
{
$this->birthDate = $birthDate;
return $this;
}
public function getCivility(): ?string
{
return $this->civility;
}
public function setCivility(?string $civility): self
{
$this->civility = $civility;
return $this;
}
public function getSchoolName(): ?string
{
return $this->schoolName;
}
public function setSchoolName(?string $schoolName): self
{
$this->schoolName = $schoolName;
return $this;
}
/**
* @return Collection<int, RentalHistory>
*/
public function getRentalHistories(): Collection
{
return $this->rentalHistories;
}
public function addRentalHistory(RentalHistory $rentalHistory): self
{
if (!$this->rentalHistories->contains($rentalHistory)) {
$this->rentalHistories->add($rentalHistory);
$rentalHistory->setTenant($this);
}
return $this;
}
public function removeRentalHistory(RentalHistory $rentalHistory): self
{
if ($this->rentalHistories->removeElement($rentalHistory)) {
// set the owning side to null (unless already changed)
if ($rentalHistory->getTenant() === $this) {
$rentalHistory->setTenant(null);
}
}
return $this;
}
/**
* @return Collection<int, AgentCountryCovered>
*/
public function getAgentCountryCovereds(): Collection
{
return $this->agentCountryCovereds;
}
public function addAgentCountryCovered(AgentCountryCovered $agentCountryCovered): self
{
if (!$this->agentCountryCovereds->contains($agentCountryCovered)) {
$this->agentCountryCovereds->add($agentCountryCovered);
$agentCountryCovered->setAgent($this);
}
return $this;
}
public function removeAgentCountryCovered(AgentCountryCovered $agentCountryCovered): self
{
if ($this->agentCountryCovereds->removeElement($agentCountryCovered)) {
// set the owning side to null (unless already changed)
if ($agentCountryCovered->getAgent() === $this) {
$agentCountryCovered->setAgent(null);
}
}
return $this;
}
public function getManagedBy(): ?self
{
return $this->managedBy;
}
public function setManagedBy(?self $managedBy): self
{
$this->managedBy = $managedBy;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getManaged(): Collection
{
return $this->managed;
}
public function addManaged(self $managed): self
{
if (!$this->managed->contains($managed)) {
$this->managed->add($managed);
$managed->setManagedBy($this);
}
return $this;
}
public function removeManaged(self $managed): self
{
if ($this->managed->removeElement($managed)) {
// set the owning side to null (unless already changed)
if ($managed->getManagedBy() === $this) {
$managed->setManagedBy(null);
}
}
return $this;
}
public function getTeamWith(): ?self
{
return $this->teamWith;
}
public function setTeamWith(?self $teamWith): self
{
$this->teamWith = $teamWith;
return $this;
}
/**
* @return Collection<int, self>
*/
public function getTeamWithAgent(): Collection
{
return $this->teamWithAgent;
}
public function addTeamWithAgent(self $teamWithAgent): self
{
if (!$this->teamWithAgent->contains($teamWithAgent)) {
$this->teamWithAgent->add($teamWithAgent);
$teamWithAgent->setTeamWith($this);
}
return $this;
}
public function removeTeamWithAgent(self $teamWithAgent): self
{
if ($this->teamWithAgent->removeElement($teamWithAgent)) {
// set the owning side to null (unless already changed)
if ($teamWithAgent->getTeamWith() === $this) {
$teamWithAgent->setTeamWith(null);
}
}
return $this;
}
/**
* @return Collection<int, Document>
*/
public function getDocuments(): Collection
{
return $this->documents;
}
public function addDocument(Document $document): self
{
if (!$this->documents->contains($document)) {
$this->documents->add($document);
$document->setUser($this);
}
return $this;
}
public function removeDocument(Document $document): self
{
if ($this->documents->removeElement($document)) {
// set the owning side to null (unless already changed)
if ($document->getUser() === $this) {
$document->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, BuildingReportingHistory>
*/
public function getBuildingReportingHistoriesUser(): Collection
{
return $this->buildingReportingHistoriesUser;
}
public function addBuildingReportingHistory(BuildingReportingHistory $buildingReportingHistoriesUser): self
{
if (!$this->buildingReportingHistoriesUser->contains($buildingReportingHistoriesUser)) {
$this->buildingReportingHistoriesUser->add($buildingReportingHistoriesUser);
$buildingReportingHistoriesUser->setUser($this);
}
return $this;
}
public function removeBuildingReportingHistory(BuildingReportingHistory $buildingReportingHistoriesUser): self
{
if ($this->buildingReportingHistoriesUser->removeElement($buildingReportingHistoriesUser)) {
// set the owning side to null (unless already changed)
if ($buildingReportingHistoriesUser->getUser() === $this) {
$buildingReportingHistoriesUser->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, RefusedVisa>
*/
public function getRefusedVisas(): Collection
{
return $this->refusedVisas;
}
public function addRefusedVisa(RefusedVisa $refusedVisa): self
{
if (!$this->refusedVisas->contains($refusedVisa)) {
$this->refusedVisas->add($refusedVisa);
$refusedVisa->setUser($this);
}
return $this;
}
public function removeRefusedVisa(RefusedVisa $refusedVisa): self
{
if ($this->refusedVisas->removeElement($refusedVisa)) {
// set the owning side to null (unless already changed)
if ($refusedVisa->getUser() === $this) {
$refusedVisa->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, HousingCertificate>
*/
public function getHousingCertificates(): Collection
{
return $this->housingCertificates;
}
public function addHousingCertificate(HousingCertificate $housingCertificate): self
{
if (!$this->housingCertificates->contains($housingCertificate)) {
$this->housingCertificates->add($housingCertificate);
$housingCertificate->setUser($this);
}
return $this;
}
public function removeHousingCertificate(HousingCertificate $housingCertificate): self
{
if ($this->housingCertificates->removeElement($housingCertificate)) {
// set the owning side to null (unless already changed)
if ($housingCertificate->getUser() === $this) {
$housingCertificate->setUser(null);
}
}
return $this;
}
/**
* @return Collection<int, BuildingFolder>
*/
public function getBuildingFolders(): Collection
{
return $this->buildingFolders;
}
public function addBuildingFolder(BuildingFolder $buildingFolder): self
{
if (!$this->buildingFolders->contains($buildingFolder)) {
$this->buildingFolders->add($buildingFolder);
$buildingFolder->setTenant($this);
}
return $this;
}
public function removeBuildingFolder(BuildingFolder $buildingFolder): self
{
if ($this->buildingFolders->removeElement($buildingFolder)) {
// set the owning side to null (unless already changed)
if ($buildingFolder->getTenant() === $this) {
$buildingFolder->setTenant(null);
}
}
return $this;
}
/**
* @return Collection<int, Residence>
*/
public function getResidences(): Collection
{
return $this->residences;
}
public function addResidence(Residence $residence): self
{
if (!$this->residences->contains($residence)) {
$this->residences->add($residence);
$residence->setAdministrator($this);
}
return $this;
}
public function removeResidence(Residence $residence): self
{
if ($this->residences->removeElement($residence)) {
// set the owning side to null (unless already changed)
if ($residence->getAdministrator() === $this) {
$residence->setAdministrator(null);
}
}
return $this;
}
public function getNameLegal(): ?string
{
return $this->nameLegal;
}
public function setNameLegal(?string $nameLegal): self
{
$this->nameLegal = $nameLegal;
return $this;
}
public function getFirstNameLegal(): ?string
{
return $this->firstNameLegal;
}
public function setFirstNameLegal(?string $firstNameLegal): self
{
$this->firstNameLegal = $firstNameLegal;
return $this;
}
public function getPhoneLegal(): ?string
{
return $this->phoneLegal;
}
public function setPhoneLegal(?string $phoneLegal): self
{
$this->phoneLegal = $phoneLegal;
return $this;
}
public function getEmailLegal(): ?string
{
return $this->emailLegal;
}
public function setEmailLegal(?string $emailLegal): self
{
$this->emailLegal = $emailLegal;
return $this;
}
public function getActivity(): ?string
{
return $this->activity;
}
public function setActivity(?string $activity): self
{
$this->activity = $activity;
return $this;
}
/**
* @return Collection<int, WantedVisio>
*/
public function getWantedVisios(): Collection
{
return $this->wantedVisios;
}
public function addWantedVisio(WantedVisio $wantedVisio): self
{
if (!$this->wantedVisios->contains($wantedVisio)) {
$this->wantedVisios->add($wantedVisio);
$wantedVisio->setRequester($this);
}
return $this;
}
public function removeWantedVisio(WantedVisio $wantedVisio): self
{
if ($this->wantedVisios->removeElement($wantedVisio)) {
// set the owning side to null (unless already changed)
if ($wantedVisio->getRequester() === $this) {
$wantedVisio->setRequester(null);
}
}
return $this;
}
/**
* @return Collection<int, LikedBuilding>
*/
public function getLikedBuildings(): Collection
{
return $this->likedBuildings;
}
public function addLikedBuilding(LikedBuilding $likedBuilding): self
{
if (!$this->likedBuildings->contains($likedBuilding)) {
$this->likedBuildings->add($likedBuilding);
$likedBuilding->setUser($this);
}
return $this;
}
public function removeLikedBuilding(LikedBuilding $likedBuilding): self
{
if ($this->likedBuildings->removeElement($likedBuilding)) {
// set the owning side to null (unless already changed)
if ($likedBuilding->getUser() === $this) {
$likedBuilding->setUser(null);
}
}
return $this;
}
public function getPackAttestation(): ?int
{
return $this->packAttestation;
}
public function setPackAttestation(int $packAttestation): static
{
$this->packAttestation = $packAttestation;
return $this;
}
public function getAgentEnderControl(): ?string
{
return $this->agentEnderControl;
}
public function setAgentEnderControl(?string $agentEnderControl): static
{
$this->agentEnderControl = $agentEnderControl;
return $this;
}
public function getConsulatCountry(): ?string
{
return $this->consulatCountry;
}
public function setConsulatCountry(?string $consulatCountry): static
{
$this->consulatCountry = $consulatCountry;
return $this;
}
}