src/Entity/User.php line 28

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Enum\NotificationType;
  4. use App\Repository\UserRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\DBAL\Types\Types;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. use Symfony\Component\Serializer\Annotation\Groups;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  13. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  14. use Symfony\Component\Security\Core\User\UserInterface;
  15. use Symfony\Component\Uid\Uuid;
  16. use Misd\PhoneNumberBundle\Validator\Constraints\PhoneNumber as AssertPhoneNumber;
  17. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  18. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordToken;
  19. #[ORM\Entity(repositoryClassUserRepository::class)]
  20. #[ORM\Table(name'users')]
  21. #[UniqueEntity(fields: ['email'], message'Cette adresse email est déjà utilisée par un autre compte')]
  22. /**
  23.  * @Vich\Uploadable()
  24.  */
  25. class User implements UserInterfacePasswordAuthenticatedUserInterface
  26. {
  27.    
  28.     #[ORM\Id]
  29.     #[ORM\Column(type'string'length22uniquetrue)]
  30.     #[Groups(['campaign''user_read','mission_list''mission_read''mission_participant_write''message_write','message_read','user_directory'])]
  31.     private string $id;
  32.     #[ORM\Column(type'string'length180nullabletrue)]
  33.     // #[Assert\NotBlank(message: 'Ce champs est requis')]
  34.     #[Groups(['user_read''mission_read','mission_list''mission_participant_write','message_read''message_write','user_directory'])]
  35.     private ?string $firstname null;
  36.     #[ORM\Column(type'boolean'nullabletrue)]
  37.     private ?bool $newAdd false;
  38.     #[ORM\Column(type'boolean'nullabletrue)]
  39.     private ?bool $allCompany false;
  40.      #[ORM\Column(type'boolean'nullabletrue)]
  41.      #[Groups(['mission_list','mission_read','message_read','user_read'])]
  42.     private ?bool $salary false;
  43.      #[ORM\Column(type'boolean'nullabletrue)]
  44.     private ?bool $manager false;
  45.       #[ORM\Column(type'boolean'nullabletrue)]
  46.     private ?bool $partner false;
  47.     #[ORM\Column(type'boolean'nullabletrue)]
  48.     #[Groups(['mission_list','mission_read','message_read','user_read'])]
  49.     private ?bool $shareMyEmail false;
  50.      #[ORM\Column(type'boolean'nullabletrue)]
  51.      #[Groups(['mission_list','mission_read','message_read','user_read'])]
  52.     private ?bool $shareMyPhone false;
  53.     #[ORM\Column(type'boolean'nullabletrue)]
  54.     #[Groups(['mission_list','mission_read','message_read','user_read'])]
  55.     private ?bool $shareMyWhatsapp false;
  56.     #[ORM\Column(type'string'length255nullabletrue)]
  57.     #[Groups(['mission_list','mission_read','message_read','user_read'])]
  58.     private ?string $myWhatsappLink null;
  59.     #[ORM\Column(type'string'length180nullabletrue)]
  60.     // #[Assert\NotBlank(message: 'Ce champs est requis')]
  61.     #[Groups(['user_read''mission_read','mission_list','message_read''mission_participant_write''message_write','user_directory'])]
  62.     private ?string $lastname null;
  63.     #[ORM\Column(type'string'nullabletrue)]
  64.     #[Groups(['user_read''mission_read','mission_list','message_read''mission_participant_write'])]
  65.     private ?string $cellPhone null;
  66.     #[ORM\Column(type'boolean'nullabletrue)]
  67.     #[Groups(['mission_list','user_read''mission_read','message_read''mission_participant_write'])]
  68.     private ?bool $enabled false;
  69.      #[ORM\Column(type'boolean'nullabletrue)]
  70.     private ?bool $external false;
  71.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  72.     #[Groups(['mission_list','user_read','message_read','mission_read'])]
  73.     private ?float $dailyRate null;
  74.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  75.     #[Groups(['mission_list','user_read','message_read','mission_read'])]
  76.     private ?float $resaleRate null;
  77.     #[ORM\Column(type'smallint'nullabletrue)]
  78.     private ?int $billingMethod 0;
  79.     /**
  80.      * @Vich\UploadableField(mapping="sub_contractor_image", fileNameProperty="pictureName")
  81.      */
  82.     #[Assert\File(mimeTypes: ['image/png''image/jpeg''image/jpg','image/webp'], mimeTypesMessage'Les formats supportés sont : PNG, JPEG, JPG')]
  83.     private ?File $picture null;
  84.     #[ORM\Column(type'string'nullabletrue)]
  85.     #[Groups(['mission_list','user_read''mission_read','message_read','user_directory'])]
  86.     private ?string $pictureName null;
  87.     #[ORM\Column(type'datetime'nullabletrue)]
  88.     #[Groups(['mission_list','user_read','message_read'])]
  89.     private ?\DateTimeInterface $updatedAt null;
  90.     #[ORM\Column(type'string'length180uniquetrue)]
  91.     #[Assert\NotBlank(message'Ce champ est requis')]
  92.     // #[Assert\Email(message: 'Cette adresse n\'est pas valide')]
  93.     #[Groups(['mission_list','user_read''mission_read','message_read''mission_participant_write'])]
  94.     private string $email '';
  95.     #[ORM\Column(type'string'length180nullabletrue)]
  96.     private $OriginalEmail ;
  97.     #[ORM\Column(type'json')]
  98.     #[Groups(['user_read'])]
  99.     private array $roles = [];
  100.     #[ORM\Column(type'string')]
  101.     private string $password '';
  102.     #[Assert\Length(min8minMessage'Le mot de passe doit faire 8 charactères minimum')]
  103.     #[Assert\NotCompromisedPassword(message'Votre mot de passe est trop faible, merci d\'en choisir un plus fort'threshold50000)]
  104.     private ?string $plainPassword null;
  105.     #[ORM\Column(type'datetime'nullabletrue)]
  106.     private ?\DateTimeInterface $createdAt;
  107.     #[ORM\Column(type'datetime'nullabletrue)]
  108.     private ?\DateTimeInterface $lastConnectionAt null;
  109.     #[ORM\Column(type'string'nullabletrue)]
  110.     private ?string $accountType;
  111.     #[ORM\ManyToOne(targetEntityCompany::class, inversedBy'users')]
  112.     #[Groups(['user_read','message_read'])]
  113.     private ?Company $company;
  114.     #[ORM\ManyToMany(inversedBy'otherUser',targetEntityCompany::class)]
  115.     private $otherCompany;
  116.     #[ORM\OneToMany(mappedBy'user'targetEntityMessage::class)]
  117.     private $messages;
  118.    
  119.     #[ORM\OneToOne(targetEntityUserData::class, cascade: ['persist''remove'])]
  120.     private ?UserData $userData;
  121.     #[ORM\OneToMany(mappedBy'user'targetEntityFileMission::class)]
  122.     private $fileMissions;
  123.     #[ORM\ManyToMany(mappedBy'user'targetEntityWorkflowAction::class)]
  124.     private $workflowAction;
  125.     #[ORM\OneToMany(mappedBy'user'targetEntityInfoMission::class)]
  126.     private $infoMissions;
  127.     #[ORM\OneToMany(mappedBy'contact'targetEntityMission::class)]
  128.     private $missions;
  129.     #[ORM\OneToMany(mappedBy'user'targetEntityHistorique::class)]
  130.     private $historiques;
  131.     #[ORM\OneToMany(mappedBy'orderedBy'targetEntityCreditHistory::class)]
  132.     private $creditHistories;
  133.     #[ORM\OneToMany(mappedBy'orderedBy'targetEntityCampaign::class)]
  134.     private $campaigns;
  135.     #[ORM\OneToMany(mappedBy'user'targetEntitySubContractorCompany::class, cascade: ["persist"])]
  136.     private $subContractorCompanies;
  137.     #[ORM\Column(type'json'nullabletrue)]
  138.     #[Groups(['user_read'])]
  139.     private ?array $notificationType = [0,1,2];
  140.     #[ORM\Column(type'json'nullabletrue)]
  141.     #[Groups(['user_read'])]
  142.     private ?array $notification = [0,1,2,3,4,5];
  143.     #[ORM\Column(type'json'nullabletrue)]
  144.     #[Groups(['user_read'])]
  145.     private $freqNotification = [1];
  146.     #[ORM\Column(type'json'nullabletrue)]
  147.     #[Groups(['user_read'])]
  148.     private $freqNotificationEverytime = [1,3,5,8];
  149.     #[ORM\Column(type'json'nullabletrue)]
  150.     #[Groups(['user_read'])]
  151.     private $freqNotificationPerDay = [0,2];
  152.     #[ORM\Column(type'json'nullabletrue)]
  153.     #[Groups(['user_read'])]
  154.     private $freqNotificationPerWeek = [6];
  155.     #[ORM\Column(type'json'nullabletrue)]
  156.     #[Groups(['user_read'])]
  157.     private $freqNotificationPerMonth = [];
  158.     #[ORM\OneToMany(mappedBy'user'targetEntityDevice::class)]
  159.     private $devices;
  160.     #[ORM\OneToMany(mappedBy'user'targetEntityService::class)]
  161.     #[Groups(['user_read'])]
  162.     private $services;
  163.     #[ORM\ManyToMany(targetEntityJob::class, mappedBy'user')]
  164.     #[Groups(['user_directory','user_read'])]
  165.     private $jobs;
  166.     #[ORM\Column(type'boolean'options: ['default' => false])]
  167.     private ?bool $isActiveNotification false;
  168.     #[ORM\Column(type'boolean')]
  169.     #[Groups(['mission_list','user_read''mission_read''mission_participant_write'])]
  170.     private ?bool $deleted false;
  171.     #[ORM\Column(type'boolean')]
  172.     private ?bool $referencingConfirmationNotification false;
  173.     #[ORM\Column(type'string'length255nullabletrue)]
  174.     #[Groups(['user_read'])]
  175.     private $gender;
  176.     #[ORM\OneToMany(mappedBy'orderBy'targetEntityBalanceTransactions::class)]
  177.     private $balanceTransactions;
  178.     #[ORM\Column(type'array'nullabletrue)]
  179.     private $deviceConnectedList = [];
  180.     #[ORM\Column(type'array'nullabletrue)]
  181.     private $mailAlias = [];
  182.     #[ORM\Column]
  183.     private ?bool $invisible null;
  184.     #[ORM\Column(nullabletrue)]
  185.     private ?\DateTimeImmutable $lastActivityAt null;
  186.     #[ORM\Column(nullabletrue)]
  187.     private ?bool $isLogged null;
  188.     #[ORM\OneToMany(mappedBy'user'targetEntityMessageReaction::class)]
  189.     private Collection $messageReactions;
  190.     #[ORM\OneToMany(mappedBy'user'targetEntityEmoji::class)]
  191.     private Collection $emoji;
  192.     #[ORM\OneToMany(mappedBy'orderedBy'targetEntityCommandeLogging::class)]
  193.     private $commandeLoggings;
  194.     #[ORM\OneToMany(mappedBy'user'targetEntitySupport::class, orphanRemovaltrue,cascade: ["persist"])]
  195.     private $supports;
  196.     
  197.     #[ORM\OneToMany(mappedBy'user'targetEntityConfidentialityContract::class)]
  198.     private Collection $confidentialityContracts;
  199.     #[ORM\OneToMany(mappedBy'user'targetEntityCampaignPendingToSend::class)]
  200.     private $campaignPendingToSends;
  201.     private $resetToken null;
  202.     #[ORM\Column(type'boolean'nullabletrue)]
  203.     private $isNewClient;
  204.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  205.     private $autorizationDateAt;
  206.     #[ORM\Column(type'boolean'nullabletrue)]
  207.     private $acceptPresentation;
  208.     #[ORM\Column(type'text'nullabletrue)]  
  209.     #[Groups(['user_directory'])]
  210.     private $description;
  211.     #[ORM\Column(type'string'length255nullabletrue)]
  212.     #[Groups(['user_directory'])]
  213.     private $title;
  214.     #[ORM\Column(type'string'length255nullabletrue)]
  215.     private $oneTimeLoginToken;
  216.     #[ORM\Column(type'string'length255nullabletrue)]
  217.     private $state
  218.     
  219.     #[ORM\OneToMany(mappedBy'user'targetEntityPortfolio::class)]
  220.     #[Groups(['user_directory'])]
  221.     private $portfolio
  222.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'children',cascade: ["persist"])]
  223.     private $parent;
  224.     #[ORM\OneToMany(mappedBy'parent'targetEntityUser::class,cascade: ["persist"])]
  225.     private $children;
  226.     #[ORM\OneToMany(mappedBy'user'targetEntitySignedContract::class)]
  227.     private $signedContracts;
  228.     #[ORM\OneToMany(mappedBy'representative'targetEntityCompany::class)]
  229.     private $companiesRepresentative;
  230.     private $originalEmail "";
  231.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityProduct::class)]
  232.     private $products;
  233.     #[ORM\ManyToMany(targetEntityWorkflowStep::class, mappedBy'userResponsable')]
  234.     private $workflowSteps;
  235.     //only for API
  236.     #[Groups(['user_read'])]
  237.     private $listAccount;
  238.     #[Groups(['user_read'])]
  239.     private $originalMailUser "";
  240.     #[Groups(['user_read'])]
  241.     private $roleName ="";
  242.     #[Groups(['user_read'])]
  243.     private $lastActivityInMinute 99999;
  244.     ///////
  245.     private $fullName;
  246.     #[ORM\Column(type'string'length255nullabletrue)]
  247.     #[Groups(['message_read''mission_read''message_write'])]
  248.     private $identifier;
  249.     #[ORM\OneToMany(mappedBy'createdBy'targetEntitySharedResourcesCategory::class)]
  250.     private Collection $sharedResourcesCategories;
  251.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityCompanyResource::class)]
  252.     private Collection $companyResources;
  253.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityResourceDeliverableHistory::class)]
  254.     private Collection $resourceDeliverableHistories;
  255.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityFilesResourceDeliverableHistory::class)]
  256.     private Collection $filesResourceDeliverableHistories;
  257.     #[ORM\ManyToMany(targetEntityFilePermissions::class, mappedBy'user')]
  258.     private Collection $filePermissions;
  259.     #[ORM\ManyToMany(targetEntityFolderPermissions::class, mappedBy'user')]
  260.     private Collection $folderPermissions;
  261.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityFolderPermissions::class)]
  262.     private Collection $folderPermissionsCreatedBy;
  263.     #[ORM\OneToMany(mappedBy'createdBy'targetEntityFilePermissions::class)]
  264.     private Collection $filePermissionsCreatedBy;
  265.      #[ORM\OneToMany(mappedBy'user'targetEntitynoteUser::class, cascade: ["persist""remove"], orphanRemovaltrue)]
  266.     private ?Collection $noteUser;
  267.      #[ORM\OneToMany(mappedBy'user'targetEntityAppPromotion::class)]
  268.      private Collection $appPromotions;
  269.      #[ORM\Column(length255nullabletrue)]
  270.      private ?string $myFlowEmail null;
  271.     
  272.     
  273.     public function __construct()
  274.     {
  275.         $this->id Uuid::v4()->toBase58();
  276.         $this->createdAt = new \DateTime('now');
  277.         $this->messages = new ArrayCollection();
  278.         $this->infoMissions = new ArrayCollection();
  279.         $this->missions = new ArrayCollection();
  280.         $this->historiques = new ArrayCollection();
  281.         $this->creditHistories = new ArrayCollection();
  282.         $this->campaigns = new ArrayCollection();
  283.         $this->subContractorCompanies = new ArrayCollection();
  284.         $this->devices = new ArrayCollection();
  285.         $this->services = new ArrayCollection();
  286.         $this->jobs = new ArrayCollection();
  287.         $this->balanceTransactions = new ArrayCollection();
  288.         $this->invisible false;
  289.         $this->company null;
  290.         $this->dailyRate 0;
  291.         $this->resaleRate 0;
  292.         $this->workflowAction = new ArrayCollection();
  293.         $this->messageReactions = new ArrayCollection();
  294.         $this->emoji = new ArrayCollection();
  295.         $this->commandeLoggings = new ArrayCollection();
  296.         $this->supports = new ArrayCollection();
  297.         $this->confidentialityContracts = new ArrayCollection();
  298.         $this->campaignPendingToSends = new ArrayCollection();
  299.         $this->fileMissions = new ArrayCollection();
  300.         $this->isNewClient false;
  301.         $this->autorizationDateAt = new \DateTimeImmutable();
  302.         $this->state 'enabled'
  303.         $this->portfolio = new ArrayCollection();
  304.         $this->otherCompany = new ArrayCollection();
  305.         $this->children = new ArrayCollection();
  306.         $this->signedContracts = new ArrayCollection();
  307.         $this->companiesRepresentative = new ArrayCollection();
  308.         $this->products = new ArrayCollection();
  309.         $this->workflowSteps = new ArrayCollection();
  310.         $this->sharedResourcesCategories = new ArrayCollection();
  311.         $this->companyResources = new ArrayCollection();
  312.         $this->resourceDeliverableHistories = new ArrayCollection();
  313.         $this->filesResourceDeliverableHistories = new ArrayCollection();
  314.         $this->filePermissions = new ArrayCollection();
  315.         $this->folderPermissions = new ArrayCollection();
  316.         $this->folderPermissionsCreatedBy = new ArrayCollection();
  317.         $this->filePermissionsCreatedBy = new ArrayCollection();
  318.         $this->noteUser = new ArrayCollection();
  319.         $this->appPromotions = new ArrayCollection();
  320.         $this->roles= ['ROLE_OBSERVER_EXTERNAL'];
  321.     }
  322.     public function getId(): ?string
  323.     {
  324.         return $this->id;
  325.     }
  326.     public function setId($id){
  327.         $this->id $id;
  328.         return $this;
  329.     }
  330.     public function __toString(): string
  331.     {
  332.         return $this->getFirstname().' '.$this->getLastname();
  333.     }
  334.     public function getEmail(): ?string
  335.     {
  336.         if ($this->getOriginalEmail() != null) {
  337.             return $this->getOriginalEmail();
  338.         }
  339.         return $this->email;
  340.     }
  341.     public function getOriginalMailUser(): ?string
  342.     {
  343.         return $this->email;
  344.     }
  345.     //  public function getOriginalEmail(): ?string
  346.     // {
  347.     //     return $this->email;
  348.     // }
  349.     public function setEmail(string $email): self
  350.     {
  351.         $this->email $email;
  352.         return $this;
  353.     }
  354.     /**
  355.      * A visual identifier that represents this user.
  356.      *
  357.      * @see UserInterface
  358.      */
  359.     public function getUserIdentifier(): string
  360.     {
  361.         return (string) $this->email;
  362.     }
  363.     /**
  364.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  365.      */
  366.     public function getUsername(): string
  367.     {
  368.         return (string) $this->email;
  369.     }
  370.     /**
  371.      * @see UserInterface
  372.      */
  373.     public function getRoles(): array
  374.     {
  375.         $roles $this->roles;
  376.         // if (isset($_SESSION['_sf2_attributes']['role_current_user']) and null !== $_SESSION['_sf2_attributes']['role_current_user']) {
  377.         //    $roles[0]= $_SESSION['_sf2_attributes']['role_current_user'];
  378.         // }
  379.         // $roles[0]='ROLE_MANAGER';
  380.         // guarantee every user at least has ROLE_USER
  381.         $roles[] = 'ROLE_USER';
  382.         return array_unique($roles);
  383.     }
  384.     public function getOriginalRoles(): array 
  385.     {
  386.         $roles $this->roles;
  387.         // $roles[0]='ROLE_MANAGER';
  388.         // guarantee every user at least has ROLE_USER
  389.         $roles[] = 'ROLE_USER';
  390.         return array_unique($roles);
  391.     }
  392.     public function setRoles(array $roles): self
  393.     {
  394.         $this->roles $roles;
  395.         return $this;
  396.     }
  397.     /**
  398.      * @see PasswordAuthenticatedUserInterface
  399.      */
  400.     public function getPassword(): string
  401.     {
  402.         return $this->password;
  403.     }
  404.     public function setPassword(string $password): self
  405.     {
  406.         
  407.         $this->password $password;
  408.         return $this;
  409.     }
  410.     /**
  411.      * Returning a salt is only needed, if you are not using a modern
  412.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  413.      *
  414.      * @see UserInterface
  415.      */
  416.     public function getSalt(): ?string
  417.     {
  418.         return null;
  419.     }
  420.     /**
  421.      * @see UserInterface
  422.      */
  423.     public function eraseCredentials()
  424.     {
  425.         // If you store any temporary, sensitive data on the user, clear it here
  426.         // $this->plainPassword = null;
  427.     }
  428.     /**
  429.      * @return string|null
  430.      */
  431.     public function getFirstname(): ?string
  432.     {
  433.         return $this->firstname;
  434.     }
  435.     /**
  436.      * @param mixed $firstname
  437.      */
  438.     public function setFirstname(?string $firstname): self
  439.     {
  440.         $this->firstname $firstname;
  441.         return $this;
  442.     }
  443.     /**
  444.      * @return string|null
  445.      */
  446.     public function getLastname(): ?string
  447.     {
  448.         return $this->lastname;
  449.     }
  450.     /**
  451.      * @param mixed $lastname
  452.      */
  453.     public function setLastname(?string $lastname): self
  454.     {
  455.         $this->lastname $lastname;
  456.         return $this;
  457.     }
  458.     /**
  459.      * @return string|null
  460.      */
  461.     public function getCellPhone(): ?string
  462.     {
  463.         return $this->cellPhone;
  464.     }
  465.     /**
  466.      * @param mixed $cellPhone
  467.      */
  468.     public function setCellPhone(?string $cellPhone): self
  469.     {
  470.         $this->cellPhone $cellPhone;
  471.         return $this;
  472.     }
  473.     /**
  474.      * @return bool
  475.      */
  476.     public function isEnabled(): bool
  477.     {
  478.         return $this->enabled;
  479.     }
  480.     /**
  481.      * @param int $enabled
  482.      */
  483.     public function setEnabled(bool $enabled): self
  484.     {
  485.         if (is_null($this->getParent()) and $enabled) {
  486.             foreach ($this->getChildren() as $userChild) {
  487.                 $userChild->setEnabled($enabled);
  488.             }
  489.         }
  490.         $this->enabled $enabled;
  491.         return $this;
  492.     }
  493.     /**
  494.      * @return bool|null
  495.      */
  496.     public function isExternal(): ?bool
  497.     {
  498.         return $this->external;
  499.     }
  500.     /**
  501.      * @param int $external
  502.      */
  503.     public function setExternal(bool $external): self
  504.     {
  505.         $this->external $external;
  506.         return $this;
  507.     }
  508.     /**
  509.      * @return mixed
  510.      */
  511.     public function getDailyRate(): ?string
  512.     {
  513.         return $this->dailyRate;
  514.     }
  515.     /**
  516.      * @param mixed $dailyRate
  517.      */
  518.     public function setDailyRate(?string $dailyRate): void
  519.     {
  520.         $this->dailyRate $dailyRate;
  521.     }
  522.     /**
  523.      * @return mixed
  524.      */
  525.     public function getBillingMethod(): ?string
  526.     {
  527.         return $this->billingMethod;
  528.     }
  529.     /**
  530.      * @param mixed $billingMethod
  531.      */
  532.     public function setBillingMethod(?string $billingMethod): void
  533.     {
  534.         $this->billingMethod $billingMethod;
  535.     }
  536.     public function serialize()
  537.     {
  538.         $this->picture base64_encode($this->picture);
  539.     }
  540.     public function unserialize($serialized)
  541.     {
  542.         $this->picture base64_decode($this->picture);
  543.     }
  544.     /**
  545.      * @return File|null
  546.      */
  547.     public function getPicture(): ?File
  548.     {
  549.         return $this->picture;
  550.     }
  551.     public function setPicture(?File $picture null): void
  552.     {
  553.         $this->picture $picture;
  554.         if (null !== $picture) {
  555.             // It is required that at least one field changes if you are using doctrine
  556.             // otherwise the event listeners won't be called and the file is lost
  557.             $this->updatedAt = new \DateTimeImmutable();
  558.         }
  559.     }
  560.     public function getUpdatedAt(): ?\DateTimeInterface
  561.     {
  562.         return $this->updatedAt;
  563.     }
  564.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  565.     {
  566.         $this->updatedAt $updatedAt;
  567.         return $this;
  568.     }
  569.     /**
  570.      * @return string|null
  571.      */
  572.     public function getPictureName(): ?string
  573.     {
  574.         return $this->pictureName;
  575.     }
  576.     /**
  577.      * @param string|null $pictureName
  578.      */
  579.     public function setPictureName(?string $pictureName): void
  580.     {
  581.         $this->pictureName $pictureName;
  582.     }
  583.     /**
  584.      * @return \DateTimeInterface|null
  585.      */
  586.     public function getCreatedAt(): ?\DateTimeInterface
  587.     {
  588.         return $this->createdAt;
  589.     }
  590.     /**
  591.      * @param \DateTimeInterface|null $createdAt
  592.      */
  593.     public function setCreatedAt(?\DateTimeInterface $createdAt): void
  594.     {
  595.         $this->createdAt $createdAt;
  596.     }
  597.     /**
  598.      * @return \DateTimeInterface|null
  599.      */
  600.     public function getLastConnectionAt(): ?\DateTimeInterface
  601.     {
  602.         return $this->lastConnectionAt;
  603.     }
  604.     /**
  605.      * @param \DateTimeInterface|null $lastConnectionAt
  606.      * @return User
  607.      */
  608.     public function setLastConnectionAt(?\DateTimeInterface $lastConnectionAt): User
  609.     {
  610.         $this->lastConnectionAt $lastConnectionAt;
  611.         return $this;
  612.     }
  613.     public function getPlainPassword(): ?string
  614.     {
  615.         return $this->plainPassword;
  616.     }
  617.     public function setPlainPassword(?string $password): self
  618.     {
  619.         $this->plainPassword $password;
  620.         return $this;
  621.     }
  622.     /**
  623.      * @return string|null
  624.      */
  625.     public function getAccountType(): ?string
  626.     {
  627.         return $this->accountType;
  628.     }
  629.     /**
  630.      * @param string|null $accountType
  631.      * @return User
  632.      */
  633.     public function setAccountType(?string $accountType): User
  634.     {
  635.         $this->accountType $accountType;
  636.         return $this;
  637.     }
  638.     public function getCompany(): ?Company
  639.     {
  640.         return $this->company;
  641.     }
  642.     public function setCompany(?Company $company): self
  643.     {
  644.         $this->company $company;
  645.         return $this;
  646.     }
  647.     /**
  648.      * @return Collection|Message[]
  649.      */
  650.     public function getMessages(): Collection
  651.     {
  652.         return $this->messages;
  653.     }
  654.     public function addMessage(Message $message): self
  655.     {
  656.         if (!$this->messages->contains($message)) {
  657.             $this->messages[] = $message;
  658.             $message->setUser($this);
  659.         }
  660.         return $this;
  661.     }
  662.     public function removeMessage(Message $message): self
  663.     {
  664.         if ($this->messages->removeElement($message)) {
  665.             // set the owning side to null (unless already changed)
  666.             if ($message->getUser() === $this) {
  667.                 $message->setUser(null);
  668.             }
  669.         }
  670.         return $this;
  671.     }
  672.     /**
  673.      * @return Collection|InfoMission[]
  674.      */
  675.     public function getInfoMissions(): Collection
  676.     {
  677.         return $this->infoMissions;
  678.     }
  679.     public function addInfoMission(InfoMission $infoMission): self
  680.     {
  681.         if (!$this->infoMissions->contains($infoMission)) {
  682.             $this->infoMissions[] = $infoMission;
  683.             $infoMission->setUser($this);
  684.         }
  685.         return $this;
  686.     }
  687.     public function removeInfoMission(InfoMission $infoMission): self
  688.     {
  689.         if ($this->infoMissions->removeElement($infoMission)) {
  690.             // set the owning side to null (unless already changed)
  691.             if ($infoMission->getUser() === $this) {
  692.                 $infoMission->setUser(null);
  693.             }
  694.         }
  695.         return $this;
  696.     }
  697.     /**
  698.      * @return Collection|Mission[]
  699.      */
  700.     public function getMissions(): Collection
  701.     {
  702.         return $this->missions;
  703.     }
  704.     public function addMission(Mission $mission): self
  705.     {
  706.         if (!$this->missions->contains($mission)) {
  707.             $this->missions[] = $mission;
  708.             $mission->setContact($this);
  709.         }
  710.         return $this;
  711.     }
  712.     public function removeMission(Mission $mission): self
  713.     {
  714.         if ($this->missions->removeElement($mission)) {
  715.             // set the owning side to null (unless already changed)
  716.             if ($mission->getContact() === $this) {
  717.                 $mission->setContact(null);
  718.             }
  719.         }
  720.         return $this;
  721.     }
  722.     /**
  723.      * @return Collection|Historique[]
  724.      */
  725.     public function getHistoriques(): Collection
  726.     {
  727.         return $this->historiques;
  728.     }
  729.     public function addHistorique(Historique $historique): self
  730.     {
  731.         if (!$this->historiques->contains($historique)) {
  732.             $this->historiques[] = $historique;
  733.             $historique->setUser($this);
  734.         }
  735.         return $this;
  736.     }
  737.     public function removeHistorique(Historique $historique): self
  738.     {
  739.         if ($this->historiques->removeElement($historique)) {
  740.             // set the owning side to null (unless already changed)
  741.             if ($historique->getUser() === $this) {
  742.                 $historique->setUser(null);
  743.             }
  744.         }
  745.         return $this;
  746.     }
  747.     /**
  748.      * @return Collection|SubContractorCompany[]
  749.      */
  750.     public function getSubContractorCompanies(): Collection
  751.     {
  752.         return $this->subContractorCompanies;
  753.     }
  754.     public function addSubContractorCompany(SubContractorCompany $subContractorCompany): self
  755.     {
  756.         if (!$this->subContractorCompanies->contains($subContractorCompany)) {
  757.             $this->subContractorCompanies[] = $subContractorCompany;
  758.             $subContractorCompany->setUser($this);
  759.         }
  760.         return $this;
  761.     }
  762.     public function removeSubContractorCompany(SubContractorCompany $subContractorCompany): self
  763.     {
  764.         if ($this->subContractorCompanies->removeElement($subContractorCompany)) {
  765.             // set the owning side to null (unless already changed)
  766.             if ($subContractorCompany->getUser() === $this) {
  767.                 $subContractorCompany->setUser(null);
  768.             }
  769.         }
  770.         return $this;
  771.     }
  772.     /**
  773.      * @return Collection|Device[]
  774.      */
  775.     public function getDevices(): Collection
  776.     {
  777.         return $this->devices;
  778.     }
  779.     public function addDevice(Device $device): self
  780.     {
  781.         if (!$this->devices->contains($device)) {
  782.             $this->devices[] = $device;
  783.             $device->setUser($this);
  784.         }
  785.         return $this;
  786.     }
  787.     public function removeDevice(Device $device): self
  788.     {
  789.         if ($this->devices->removeElement($device)) {
  790.             // set the owning side to null (unless already changed)
  791.             if ($device->getUser() === $this) {
  792.                 $device->setUser(null);
  793.             }
  794.         }
  795.         return $this;
  796.     }
  797.     /**
  798.      * @return Collection|Service[]
  799.      */
  800.     public function getServices(): Collection
  801.     {
  802.         return $this->services;
  803.     }
  804.     public function addService(Service $service): self
  805.     {
  806.         if (!$this->services->contains($service)) {
  807.             $this->services[] = $service;
  808.             $service->setUser($this);
  809.         }
  810.         return $this;
  811.     }
  812.     public function removeService(Service $service): self
  813.     {
  814.         if ($this->services->removeElement($service)) {
  815.             // set the owning side to null (unless already changed)
  816.             if ($service->getUser() === $this) {
  817.                 $service->setUser(null);
  818.             }
  819.         }
  820.         return $this;
  821.     }
  822.     /**
  823.      * @return array|null
  824.      */
  825.     public function getNotificationType(): ?array
  826.     {
  827.         return $this->notificationType;
  828.     }
  829.     /**
  830.      * @param array|null $notificationType
  831.      */
  832.     public function setNotificationType(?array $notificationType): void
  833.     {
  834.         $this->notificationType $notificationType;
  835.     }
  836.     /**
  837.      * @return array|null
  838.      */
  839.     public function getNotification(): ?array
  840.     {
  841.         return $this->notification;
  842.     }
  843.     /**
  844.      * @param array|null $notification
  845.      */
  846.     public function setNotification(?array $notification): void
  847.     {
  848.         $this->notification $notification;
  849.     }
  850.     /**
  851.      * @return Collection|Job[]
  852.      */
  853.     public function getJobs(): Collection
  854.     {
  855.         return $this->jobs;
  856.     }
  857.     public function addJob(Job $job): self
  858.     {
  859.         if (!$this->jobs->contains($job)) {
  860.             $this->jobs[] = $job;
  861.             $job->addUser($this);
  862.         }
  863.         return $this;
  864.     }
  865.     public function removeJob(Job $job): self
  866.     {
  867.         if ($this->jobs->removeElement($job)) {
  868.             $job->removeUser($this);
  869.         }
  870.         return $this;
  871.     }
  872.     public function getIsActiveNotification(): ?bool
  873.     {
  874.         return $this->isActiveNotification;
  875.     }
  876.     public function setIsActiveNotification(bool $isActiveNotification): self
  877.     {
  878.         $this->isActiveNotification $isActiveNotification;
  879.         return $this;
  880.     }
  881.     public function getDeleted(): ?bool
  882.     {
  883.         return $this->deleted;
  884.     }
  885.     public function setDeleted(bool $deleted): self
  886.     {
  887.         $this->deleted $deleted;
  888.         return $this;
  889.     }
  890.     
  891.     /**
  892.      * @return array|null
  893.      */
  894.     public function getFreqNotification(): ?array
  895.     {
  896.         return $this->freqNotification;
  897.     }
  898.     /**
  899.      * @param int|null $freqNotification
  900.      */
  901.     public function setFreqNotification(?array $freqNotification): void
  902.     {
  903.         $this->freqNotification $freqNotification;
  904.     }
  905.     /**
  906.      * @return array|null
  907.      */
  908.     public function getFreqNotificationEverytime(): ?array
  909.     {
  910.         return $this->freqNotificationEverytime;
  911.     }
  912.     /**
  913.      * @param int|null $freqNotification
  914.      */
  915.     public function setFreqNotificationEverytime(?array $freqNotificationEverytime): void
  916.     {
  917.         $this->freqNotificationEverytime $freqNotificationEverytime;
  918.     }
  919.      /**
  920.      * @return array|null
  921.      */
  922.     public function getFreqNotificationPerDay(): ?array
  923.     {
  924.         return $this->freqNotificationPerDay;
  925.     }
  926.     /**
  927.      * @param int|null $freqNotification
  928.      */
  929.     public function setFreqNotificationPerDay(?array $freqNotificationPerDay): void
  930.     {
  931.         $this->freqNotificationPerDay $freqNotificationPerDay;
  932.     }
  933.     /**
  934.      * @return array|null
  935.      */
  936.     public function getFreqNotificationPerWeek(): ?array
  937.     {
  938.         return $this->freqNotificationPerWeek;
  939.     }
  940.     /**
  941.      * @param int|null $freqNotification
  942.      */
  943.     public function setFreqNotificationPerWeek(?array $freqNotificationPerWeek): void
  944.     {
  945.         $this->freqNotificationPerWeek $freqNotificationPerWeek;
  946.     }
  947.     /**
  948.      * @return array|null
  949.      */
  950.     public function getFreqNotificationPerMonth(): ?array
  951.     {
  952.         return $this->freqNotificationPerMonth;
  953.     }
  954.     /**
  955.      * @param int|null $freqNotification
  956.      */
  957.     public function setFreqNotificationPerMonth(?array $freqNotificationPerMonth): void
  958.     {
  959.         $this->freqNotificationPerMonth $freqNotificationPerMonth;
  960.     }
  961.     /**
  962.      * @return float|null
  963.      */
  964.     public function getResaleRate(): ?float
  965.     {
  966.         return $this->resaleRate;
  967.     }
  968.     /**
  969.      * @param float|null $resaleRate
  970.      */
  971.     public function setResaleRate(?float $resaleRate): void
  972.     {
  973.         //mettre 30% si le prix de vente est 0 ou null 
  974.         if (($this->getResaleRate() == null or $this->getResaleRate() == 0)) {
  975.             if ($this->getDailyRate() != null and $this->getDailyRate() > 0) {
  976.                 $this->resaleRate $this->getDailyRate() + ($this->getDailyRate() * 0.3);
  977.             }else{
  978.                 $this->resaleRate $resaleRate;
  979.             }
  980.         }else{
  981.             $this->resaleRate $resaleRate;
  982.         }
  983.     }
  984.     public function getReferencingConfirmationNotification(): ?bool
  985.     {
  986.         return $this->referencingConfirmationNotification;
  987.     }
  988.     public function setReferencingConfirmationNotification(bool $referencingConfirmationNotification): self
  989.     {
  990.         $this->referencingConfirmationNotification $referencingConfirmationNotification;
  991.         return $this;
  992.     }
  993.     public function getGender(): ?string
  994.     {
  995.         return $this->gender;
  996.     }
  997.     public function setGender(?string $gender): self
  998.     {
  999.         $this->gender $gender;
  1000.         return $this;
  1001.     }
  1002.     public function getFullName():?string
  1003.     {
  1004.         return $this->getFirstname()."  "$this->getLastname();
  1005.     }
  1006.     /**
  1007.      * @return Collection|BalanceTransactions[]
  1008.      */
  1009.     public function getBalanceTransactions(): Collection
  1010.     {
  1011.         return $this->balanceTransactions;
  1012.     }
  1013.     public function addBalanceTransaction(BalanceTransactions $balanceTransaction): self
  1014.     {
  1015.         if (!$this->balanceTransactions->contains($balanceTransaction)) {
  1016.             $this->balanceTransactions[] = $balanceTransaction;
  1017.             $balanceTransaction->setOrderBy($this);
  1018.         }
  1019.         return $this;
  1020.     }
  1021.     public function removeBalanceTransaction(BalanceTransactions $balanceTransaction): self
  1022.     {
  1023.         if ($this->balanceTransactions->removeElement($balanceTransaction)) {
  1024.             // set the owning side to null (unless already changed)
  1025.             if ($balanceTransaction->getOrderBy() === $this) {
  1026.                 $balanceTransaction->setOrderBy(null);
  1027.             }
  1028.         }
  1029.         return $this;
  1030.     }
  1031.     public function getDeviceConnectedList(): ?array
  1032.     {
  1033.         return $this->deviceConnectedList;
  1034.     }
  1035.     public function setDeviceConnectedList(?array $deviceConnectedList): self
  1036.     {
  1037.         $this->deviceConnectedList $deviceConnectedList;
  1038.         return $this;
  1039.     }
  1040.     public function isInvisible(): ?bool
  1041.     {
  1042.         return $this->invisible;
  1043.     }
  1044.     public function setInvisible(bool $invisible): static
  1045.     {
  1046.         $this->invisible $invisible;
  1047.         return $this;
  1048.     }
  1049.     public function getLastActivityAt(): ?\DateTimeImmutable
  1050.     {
  1051.         return $this->lastActivityAt;
  1052.     }
  1053.     public function setLastActivityAt(?\DateTimeImmutable $lastActivityAt): static
  1054.     {
  1055.         $this->lastActivityAt $lastActivityAt;
  1056.         return $this;
  1057.     }
  1058.     public function getLastActivityInMinute(){
  1059.         if($this->getLastActivityAt() != null){
  1060.             $now = new \DateTimeImmutable();
  1061.             $userLastActivity $this->getLastActivityAt();
  1062.             $interval$now->diff($userLastActivity);
  1063.             return $interval->days 24 60 $interval->60 $interval->i
  1064.         }
  1065.         return 9999;
  1066.     }
  1067.     public function isLogged(): ?bool
  1068.     {
  1069.         return $this->isLogged;
  1070.     }
  1071.     public function setIsLogged(?bool $isLogged): static
  1072.     {
  1073.         $this->isLogged $isLogged;
  1074.         return $this;
  1075.     }
  1076.     public function getEnabled(): ?bool
  1077.     {
  1078.         return $this->enabled;
  1079.     }
  1080.     public function getExternal(): ?bool
  1081.     {
  1082.         return $this->external;
  1083.     }
  1084.     public function getInvisible(): ?bool
  1085.     {
  1086.         return $this->invisible;
  1087.     }
  1088.     public function getIsLogged(): ?bool
  1089.     {
  1090.         return $this->isLogged;
  1091.     }
  1092.     
  1093.     /**
  1094.      * @return Collection<int, MessageReaction>
  1095.      */
  1096.     public function getMessageReactions(): Collection
  1097.     {
  1098.         return $this->messageReactions;
  1099.     }
  1100.     public function addMessageReaction(MessageReaction $messageReaction): static
  1101.     {
  1102.         if (!$this->messageReactions->contains($messageReaction)) {
  1103.             $this->messageReactions->add($messageReaction);
  1104.             $messageReaction->setUser($this);
  1105.         }
  1106.         return $this;
  1107.     }
  1108.     public function removeMessageReaction(MessageReaction $messageReaction): static
  1109.     {
  1110.         if ($this->messageReactions->removeElement($messageReaction)) {
  1111.             // set the owning side to null (unless already changed)
  1112.             if ($messageReaction->getUser() === $this) {
  1113.                 $messageReaction->setUser(null);
  1114.             }
  1115.         }
  1116.         return $this;
  1117.     }
  1118.     /**
  1119.      * @return Collection<int, Emoji>
  1120.      */
  1121.     public function getEmoji(): Collection
  1122.     {
  1123.         return $this->emoji;
  1124.     }
  1125.     public function addEmoji(Emoji $emoji): static
  1126.     {
  1127.         if (!$this->emoji->contains($emoji)) {
  1128.             $this->emoji->add($emoji);
  1129.             $emoji->setUser($this);
  1130.         }
  1131.         return $this;
  1132.     }
  1133.     public function removeEmoji(Emoji $emoji): static
  1134.     {
  1135.         if ($this->emoji->removeElement($emoji)) {
  1136.             // set the owning side to null (unless already changed)
  1137.             if ($emoji->getUser() === $this) {
  1138.                 $emoji->setUser(null);
  1139.             }
  1140.         }
  1141.         return $this;
  1142.     }
  1143.     /**
  1144.      * @return Collection|WorkflowAction[]
  1145.      */
  1146.     public function getWorkflowAction(): Collection
  1147.     {
  1148.         return $this->workflowAction;
  1149.     }
  1150.     public function addWorkflowAction(WorkflowAction $workflowAction): self
  1151.     {
  1152.         if (!$this->workflowAction->contains($workflowAction)) {
  1153.             $this->workflowAction[] = $workflowAction;
  1154.             $workflowAction->setUser($this);
  1155.         }
  1156.         return $this;
  1157.     }
  1158.     public function removeWorkflowAction(WorkflowAction $workflowAction): self
  1159.     {
  1160.         if ($this->workflowAction->removeElement($workflowAction)) {
  1161.             // set the owning side to null (unless already changed)
  1162.             if ($workflowAction->getUser() === $this) {
  1163.                 $workflowAction->setUser(null);
  1164.             }
  1165.         }
  1166.         return $this;
  1167.     }
  1168.     public function getDefaultEmoji(){
  1169.         return [
  1170.             [
  1171.                 "emoji" => "👍️",
  1172.                 "emojiId"=>350,
  1173.                 "detail" => "thumbs up"
  1174.             ],
  1175.             [
  1176.                 "emoji" => "❤️",
  1177.                 "emojiId"=>153,
  1178.                 "detail" => "red heart"
  1179.             ],
  1180.             [
  1181.                 "emoji" => "😆",
  1182.                 "emojiId"=>5,
  1183.                 "detail" => "grinning squinting face"
  1184.             ],
  1185.             [
  1186.                 "emoji" => "😮",
  1187.                 "emojiId"=>86,
  1188.                 "detail" => "face with open mouth"
  1189.             ],
  1190.             [
  1191.                 "emoji" => "😢",
  1192.                 "emojiId"=>97,
  1193.                 "detail" => "crying face"
  1194.             ],
  1195.             [
  1196.                 "emoji" => "😡",
  1197.                 "emojiId"=>108,
  1198.                 "detail" => "enraged face"
  1199.             ],
  1200.         ];
  1201.     }
  1202.     /**
  1203.      * @return Collection|CommandeLogging[]
  1204.      */
  1205.     public function getCommandeLoggings(): Collection
  1206.     {
  1207.         return $this->commandeLoggings;
  1208.     }
  1209.     public function addCommandeLogging(CommandeLogging $commandeLogging): self
  1210.     {
  1211.         if (!$this->commandeLoggings->contains($commandeLogging)) {
  1212.             $this->commandeLoggings[] = $commandeLogging;
  1213.             $commandeLogging->setUser($this);
  1214.         }
  1215.         return $this;
  1216.     }
  1217.     public function removeCommandeLogging(CommandeLogging $commandeLogging): self
  1218.     {
  1219.         if ($this->commandeLoggings->removeElement($commandeLogging)) {
  1220.             // set the owning side to null (unless already changed)
  1221.             if ($commandeLogging->getUser() === $this) {
  1222.                 $commandeLogging->setUser(null);
  1223.             }
  1224.         }
  1225.         return $this;
  1226.     }
  1227.     public function getNewAdd(): ?bool
  1228.     {
  1229.         return $this->newAdd;
  1230.     }
  1231.     public function setNewAdd(?bool $newAdd): self
  1232.     {
  1233.         $this->newAdd $newAdd;
  1234.         return $this;
  1235.     }
  1236.     /**
  1237.      * @return Collection|CreditHistory[]
  1238.      */
  1239.     public function getCreditHistories(): Collection
  1240.     {
  1241.         return $this->creditHistories;
  1242.     }
  1243.     public function addCreditHistory(CreditHistory $creditHistory): self
  1244.     {
  1245.         if (!$this->creditHistories->contains($creditHistory)) {
  1246.             $this->creditHistories[] = $creditHistory;
  1247.             $creditHistory->setOrderedBy($this);
  1248.         }
  1249.         return $this;
  1250.     }
  1251.     public function removeCreditHistory(CreditHistory $creditHistory): self
  1252.     {
  1253.         if ($this->creditHistories->removeElement($creditHistory)) {
  1254.             // set the owning side to null (unless already changed)
  1255.             if ($creditHistory->getOrderedBy() === $this) {
  1256.                 $creditHistory->setOrderedBy(null);
  1257.             }
  1258.         }
  1259.         return $this;
  1260.     }
  1261.     /**
  1262.      * @return Collection|Campaign[]
  1263.      */
  1264.     public function getCampaigns(): Collection
  1265.     {
  1266.         return $this->campaigns;
  1267.     }
  1268.     public function addCampaign(Campaign $campaign): self
  1269.     {
  1270.         if (!$this->campaigns->contains($campaign)) {
  1271.             $this->campaigns[] = $campaign;
  1272.             $campaign->setOrderedBy($this);
  1273.         }
  1274.         return $this;
  1275.     }
  1276.     public function removeCampaign(Campaign $campaign): self
  1277.     {
  1278.         if ($this->campaigns->removeElement($campaign)) {
  1279.             // set the owning side to null (unless already changed)
  1280.             if ($campaign->getOrderedBy() === $this) {
  1281.                 $campaign->setOrderedBy(null);
  1282.             }
  1283.         }
  1284.         return $this;
  1285.     }
  1286.     public function getShareMyEmail(): ?bool
  1287.     {
  1288.         return $this->shareMyEmail;
  1289.     }
  1290.     public function setShareMyEmail(?bool $shareMyEmail): self
  1291.     {
  1292.         $this->shareMyEmail $shareMyEmail;
  1293.         return $this;
  1294.     }
  1295.     public function getShareMyPhone(): ?bool
  1296.     {
  1297.         return $this->shareMyPhone;
  1298.     }
  1299.     public function setShareMyPhone(?bool $shareMyPhone): self
  1300.     {
  1301.         $this->shareMyPhone $shareMyPhone;
  1302.         return $this;
  1303.     }
  1304.     /**
  1305.      * @return Collection|Support[]
  1306.      */
  1307.     public function getSupports(): Collection
  1308.     {
  1309.         return $this->supports;
  1310.     }
  1311.     public function addSupport(Support $support): self
  1312.     {
  1313.         if (!$this->supports->contains($support)) {
  1314.             $this->supports[] = $support;
  1315.             $support->setUser($this);
  1316.         }
  1317.         return $this;
  1318.     }
  1319.     public function removeSupport(Support $support): self
  1320.     {
  1321.         if ($this->supports->removeElement($support)) {
  1322.             // set the owning side to null (unless already changed)
  1323.             if ($support->getUser() === $this) {
  1324.                 $support->setUser(null);
  1325.             }
  1326.         }
  1327.     }
  1328.     public function getResetToken(): ?ResetPasswordToken
  1329.     {
  1330.         return $this->resetToken;
  1331.     }
  1332.     public function setResetToken(?ResetPasswordToken  $resetToken): self
  1333.     {
  1334.         $this->resetToken $resetToken;
  1335.         return $this;
  1336.     }
  1337.     /**
  1338.      * @return Collection<int, ConfidentialityContract>
  1339.      */
  1340.     public function getConfidentialityContracts(): Collection
  1341.     {
  1342.         return $this->confidentialityContracts;
  1343.     }
  1344.     public function addConfidentialityContract(ConfidentialityContract $confidentialityContract): static
  1345.     {
  1346.         if (!$this->confidentialityContracts->contains($confidentialityContract)) {
  1347.             $this->confidentialityContracts->add($confidentialityContract);
  1348.             $confidentialityContract->setUser($this);
  1349.         }
  1350.         return $this;
  1351.     }
  1352.     public function removeConfidentialityContract(ConfidentialityContract $confidentialityContract): static
  1353.     {
  1354.         if ($this->confidentialityContracts->removeElement($confidentialityContract)) {
  1355.             // set the owning side to null (unless already changed)
  1356.             if ($confidentialityContract->getUser() === $this) {
  1357.                 $confidentialityContract->setUser(null);
  1358.             }
  1359.         }
  1360.         return $this;
  1361.     }
  1362.     /**
  1363.      * @return Collection|CampaignPendingToSend[]
  1364.      */
  1365.     public function getCampaignPendingToSends(): Collection
  1366.     {
  1367.         return $this->campaignPendingToSends;
  1368.     }
  1369.     public function addCampaignPendingToSend(CampaignPendingToSend $campaignPendingToSend): self
  1370.     {
  1371.         if (!$this->campaignPendingToSends->contains($campaignPendingToSend)) {
  1372.             $this->campaignPendingToSends[] = $campaignPendingToSend;
  1373.             $campaignPendingToSend->setUser($this);
  1374.         }
  1375.         return $this;
  1376.     }
  1377.     public function removeCampaignPendingToSend(CampaignPendingToSend $campaignPendingToSend): self
  1378.     {
  1379.         if ($this->campaignPendingToSends->removeElement($campaignPendingToSend)) {
  1380.             // set the owning side to null (unless already changed)
  1381.             if ($campaignPendingToSend->getUser() === $this) {
  1382.                 $campaignPendingToSend->setUser(null);
  1383.             }
  1384.         }
  1385.         return $this;
  1386.     }
  1387.     public function isNewAdd(): ?bool
  1388.     {
  1389.         return $this->newAdd;
  1390.     }
  1391.     public function isShareMyEmail(): ?bool
  1392.     {
  1393.         return $this->shareMyEmail;
  1394.     }
  1395.     public function isShareMyPhone(): ?bool
  1396.     {
  1397.         return $this->shareMyPhone;
  1398.     }
  1399.     public function isIsActiveNotification(): ?bool
  1400.     {
  1401.         return $this->isActiveNotification;
  1402.     }
  1403.     public function isDeleted(): ?bool
  1404.     {
  1405.         return $this->deleted;
  1406.     }
  1407.     public function isReferencingConfirmationNotification(): ?bool
  1408.     {
  1409.         return $this->referencingConfirmationNotification;
  1410.     }
  1411.     public function isIsLogged(): ?bool
  1412.     {
  1413.         return $this->isLogged;
  1414.     }
  1415.     /**
  1416.      * @return Collection<int, FileMission>
  1417.      */
  1418.     public function getFileMissions(): Collection
  1419.     {
  1420.         return $this->fileMissions;
  1421.     }
  1422.     public function addFileMission(FileMission $fileMission): static
  1423.     {
  1424.         if (!$this->fileMissions->contains($fileMission)) {
  1425.             $this->fileMissions->add($fileMission);
  1426.             $fileMission->setUser($this);
  1427.         }
  1428.         return $this;
  1429.     }
  1430.     public function removeFileMission(FileMission $fileMission): static
  1431.     {
  1432.         if ($this->fileMissions->removeElement($fileMission)) {
  1433.             // set the owning side to null (unless already changed)
  1434.             if ($fileMission->getUser() === $this) {
  1435.                 $fileMission->setUser(null);
  1436.             }
  1437.         }
  1438.         return $this;
  1439.     }
  1440.     public function getIsNewClient(): ?bool
  1441.     {
  1442.         return $this->isNewClient;
  1443.     }
  1444.     public function setIsNewClient(?bool $isNewClient): self
  1445.     {
  1446.         $this->isNewClient $isNewClient;
  1447.         return $this;
  1448.     }
  1449.     public function getAutorizationDateAt(): ?\DateTimeImmutable
  1450.     {
  1451.         return $this->autorizationDateAt;
  1452.     }
  1453.     public function setAutorizationDateAt(?\DateTimeImmutable $autorizationDateAt): self
  1454.     {
  1455.         $this->autorizationDateAt $autorizationDateAt;
  1456.         return $this;
  1457.     }
  1458.     public function getUserData(): ?UserData
  1459.     {
  1460.         return $this->userData;
  1461.     }
  1462.     public function setUserData(?UserData $userData): self
  1463.     {
  1464.         $this->userData $userData;
  1465.         return $this;
  1466.     }
  1467.     public function getAcceptPresentation(): ?bool
  1468.     {
  1469.         return $this->acceptPresentation;
  1470.     }
  1471.     public function setAcceptPresentation(?bool $acceptPresentation): self
  1472.     {
  1473.         $this->acceptPresentation $acceptPresentation;
  1474.         return $this;
  1475.     }
  1476.     public function getDescription(): ?string
  1477.     {
  1478.         return $this->description;
  1479.     }
  1480.     public function setDescription(?string $description): self
  1481.     {
  1482.         $this->description $description;
  1483.         return $this;
  1484.     }
  1485.     public function getTitle(): ?string
  1486.     {
  1487.         return $this->title;
  1488.     }
  1489.     public function setTitle(?string $title): self
  1490.     {
  1491.         $this->title $title;
  1492.         return $this;
  1493.     }
  1494.     public function getOneTimeLoginToken(): ?string
  1495.     {
  1496.         return $this->oneTimeLoginToken;
  1497.     }
  1498.     public function setOneTimeLoginToken(?string $oneTimeLoginToken): self
  1499.     {
  1500.         $this->oneTimeLoginToken $oneTimeLoginToken;
  1501.         return $this;
  1502.     }
  1503.     public function getState(): ?string
  1504.     {
  1505.         return $this->state;
  1506.     }
  1507.     public function setState(?string $state): self
  1508.     {
  1509.         $this->state $state;
  1510.         return  $this
  1511.     }
  1512.     /**
  1513.      * @return Collection|Portfolio[]
  1514.      */
  1515.     public function getPortfolio(): Collection
  1516.     {
  1517.         return $this->portfolio;
  1518.     }
  1519.     public function addPortfolio(Portfolio $portfolio): self
  1520.     {
  1521.         if (!$this->portfolio->contains($portfolio)) {
  1522.             $this->portfolio[] = $portfolio;
  1523.             $portfolio->setUser($this);
  1524.         }
  1525.         return $this;
  1526.     }
  1527.     public function removePortfolio(Portfolio $portfolio): self
  1528.     {
  1529.         if ($this->portfolio->removeElement($portfolio)) {
  1530.             // set the owning side to null (unless already changed)
  1531.             if ($portfolio->getUser() === $this) {
  1532.                 $portfolio->setUser(null);
  1533.             }
  1534.         }
  1535.         return $this;
  1536.     }
  1537.     public function getSalary(): ?bool
  1538.     {
  1539.         return $this->salary;
  1540.     }
  1541.     public function setSalary(?bool $salary): self
  1542.     {
  1543.         $this->salary $salary;
  1544.         return $this;
  1545.     }
  1546.     public function getAllCompany(): ?bool
  1547.     {
  1548.         return $this->allCompany;
  1549.     }
  1550.     public function setAllCompany(?bool $allCompany): self
  1551.     {
  1552.         $this->allCompany $allCompany;
  1553.         return $this;
  1554.     }
  1555.     public function getManager(): ?bool
  1556.     {
  1557.         return $this->manager;
  1558.     }
  1559.     public function setManager(?bool $manager): self
  1560.     {
  1561.         $this->manager $manager;
  1562.         return $this;
  1563.     }
  1564.     /**
  1565.      * @return Collection|Company[]
  1566.      */
  1567.     public function getOtherCompany(): Collection
  1568.     {
  1569.         return $this->otherCompany;
  1570.     }
  1571.     public function addOtherCompany(Company $otherCompany): self
  1572.     {
  1573.         if (!$this->otherCompany->contains($otherCompany)) {
  1574.             $this->otherCompany[] = $otherCompany;
  1575.         }
  1576.         return $this;
  1577.     }
  1578.     public function removeOtherCompany(Company $otherCompany): self
  1579.     {
  1580.         $this->otherCompany->removeElement($otherCompany);
  1581.         return $this;
  1582.     }
  1583.     
  1584.     public function getPartner(): ?bool
  1585.     {
  1586.         return $this->partner;
  1587.     }
  1588.     public function setPartner(?bool $partner): self
  1589.     {
  1590.         $this->partner $partner;
  1591.         return $this;
  1592.     }
  1593.     public function getParent(): ?self
  1594.     {
  1595.         return $this->parent;
  1596.     }
  1597.     public function setParent(?self $parent): self
  1598.     {
  1599.         $this->parent $parent;
  1600.         return $this;
  1601.     }
  1602.     /**
  1603.      * @return Collection|User[]
  1604.      */
  1605.     public function getChildren(): Collection
  1606.     {
  1607.         return $this->children;
  1608.     }
  1609.     public function addChild(User $child): self
  1610.     {
  1611.         if (!$this->children->contains($child)) {
  1612.             $this->children[] = $child;
  1613.             $child->setParent($this);
  1614.         }
  1615.         return $this;
  1616.     }
  1617.     public function removeChild(User $child): self
  1618.     {
  1619.         if ($this->children->removeElement($child)) {
  1620.             // set the owning side to null (unless already changed)
  1621.             if ($child->getParent() === $this) {
  1622.                 $child->setParent(null);
  1623.             }
  1624.         }
  1625.         return $this;
  1626.     }
  1627.     public function getOriginalEmail(): ?string
  1628.     {
  1629.         return $this->OriginalEmail;
  1630.     }
  1631.     public function setOriginalEmail(?string $OriginalEmail): self
  1632.     {
  1633.         $this->OriginalEmail $OriginalEmail;
  1634.         return $this;
  1635.     }
  1636.     /**
  1637.      * @return Collection|SignedContract[]
  1638.      */
  1639.     public function getSignedContracts(): Collection
  1640.     {
  1641.         return $this->signedContracts;
  1642.     }
  1643.     public function addSignedContract(SignedContract $signedContract): self
  1644.     {
  1645.         if (!$this->signedContracts->contains($signedContract)) {
  1646.             $this->signedContracts[] = $signedContract;
  1647.             $signedContract->setUser($this);
  1648.         }
  1649.         return $this;
  1650.     }
  1651.     public function removeSignedContract(SignedContract $signedContract): self
  1652.     {
  1653.         if ($this->signedContracts->removeElement($signedContract)) {
  1654.             // set the owning side to null (unless already changed)
  1655.             if ($signedContract->getUser() === $this) {
  1656.                 $signedContract->setUser(null);
  1657.             }
  1658.         }
  1659.         return $this;
  1660.     }
  1661.     /**
  1662.      * @return Collection|Company[]
  1663.      */
  1664.     public function getCompaniesRepresentative(): Collection
  1665.     {
  1666.         return $this->companiesRepresentative;
  1667.     }
  1668.     public function addCompanyRepresentative(Company $companiesRepresentative): self
  1669.     {
  1670.         if (!$this->companiesRepresentative->contains($companiesRepresentative)) {
  1671.             $this->companiesRepresentative[] = $companiesRepresentative;
  1672.             $companiesRepresentative->setRepresentative($this);
  1673.         }
  1674.         return $this;
  1675.     }
  1676.     public function removeCompanyRepresentative(Company $companiesRepresentative): self
  1677.     {
  1678.         if ($this->companiesRepresentative->removeElement($companiesRepresentative)) {
  1679.             // set the owning side to null (unless already changed)
  1680.             if ($companiesRepresentative->getRepresentative() === $this) {
  1681.                 $companiesRepresentative->setRepresentative(null);
  1682.             }
  1683.         }
  1684.         return $this;
  1685.     }
  1686.     /**
  1687.      * @return Collection|Product[]
  1688.      */
  1689.     public function getProducts(): Collection
  1690.     {
  1691.         return $this->products;
  1692.     }
  1693.     public function addProduct(Product $product): self
  1694.     {
  1695.         if (!$this->products->contains($product)) {
  1696.             $this->products[] = $product;
  1697.             $product->setCreatedBy($this);
  1698.         }
  1699.         return $this;
  1700.     }
  1701.     public function removeProduct(Product $product): self
  1702.     {
  1703.         if ($this->products->removeElement($product)) {
  1704.             // set the owning side to null (unless already changed)
  1705.             if ($product->getCreatedBy() === $this) {
  1706.                 $product->setCreatedBy(null);
  1707.             }
  1708.         }
  1709.         return $this;
  1710.     }
  1711.     /**
  1712.      * @return Collection|WorkflowStep[]
  1713.      */
  1714.     public function getWorkflowSteps(): Collection
  1715.     {
  1716.         return $this->workflowSteps;
  1717.     }
  1718.     public function addWorkflowStep(WorkflowStep $workflowStep): self
  1719.     {
  1720.         if (!$this->workflowSteps->contains($workflowStep)) {
  1721.             $this->workflowSteps[] = $workflowStep;
  1722.             $workflowStep->addUserResponsable($this);
  1723.         }
  1724.         return $this;
  1725.     }
  1726.     public function removeWorkflowStep(WorkflowStep $workflowStep): self
  1727.     {
  1728.         if ($this->workflowSteps->removeElement($workflowStep)) {
  1729.             $workflowStep->removeUserResponsable($this);
  1730.         }
  1731.         return $this;
  1732.     }
  1733.     // for api only
  1734.         public function getListAccount()
  1735.         {
  1736.             return $this->listAccount;
  1737.         }
  1738.         public function setListAccount($listAccount){
  1739.             $this->listAccount $listAccount;
  1740.             return $this;
  1741.         }
  1742.         public function getRoleName()
  1743.         {
  1744.             return $this->roleName;
  1745.         }
  1746.         public function setRoleName($roleName){
  1747.             $this->roleName $roleName;
  1748.             return $this;
  1749.         }
  1750.         public function getIdentifier(): ?string
  1751.         {
  1752.             return $this->identifier;
  1753.         }
  1754.         public function setIdentifier(?string $identifier): self
  1755.         {
  1756.             $this->identifier $identifier;
  1757.             return $this;
  1758.         }
  1759.         /**
  1760.          * @return Collection<int, SharedResourcesCategory>
  1761.          */
  1762.         public function getSharedResourcesCategories(): Collection
  1763.         {
  1764.             return $this->sharedResourcesCategories;
  1765.         }
  1766.         public function addSharedResourcesCategory(SharedResourcesCategory $sharedResourcesCategory): static
  1767.         {
  1768.             if (!$this->sharedResourcesCategories->contains($sharedResourcesCategory)) {
  1769.                 $this->sharedResourcesCategories->add($sharedResourcesCategory);
  1770.                 $sharedResourcesCategory->setCreatedBy($this);
  1771.             }
  1772.             return $this;
  1773.         }
  1774.         public function removeSharedResourcesCategory(SharedResourcesCategory $sharedResourcesCategory): static
  1775.         {
  1776.             if ($this->sharedResourcesCategories->removeElement($sharedResourcesCategory)) {
  1777.                 // set the owning side to null (unless already changed)
  1778.                 if ($sharedResourcesCategory->getCreatedBy() === $this) {
  1779.                     $sharedResourcesCategory->setCreatedBy(null);
  1780.                 }
  1781.             }
  1782.             return $this;
  1783.         }
  1784.         /**
  1785.          * @return Collection<int, CompanyResource>
  1786.          */
  1787.         public function getCompanyResources(): Collection
  1788.         {
  1789.             return $this->companyResources;
  1790.         }
  1791.         public function addCompanyResource(CompanyResource $companyResource): static
  1792.         {
  1793.             if (!$this->companyResources->contains($companyResource)) {
  1794.                 $this->companyResources->add($companyResource);
  1795.                 $companyResource->setCreatedBy($this);
  1796.             }
  1797.             return $this;
  1798.         }
  1799.         public function removeCompanyResource(CompanyResource $companyResource): static
  1800.         {
  1801.             if ($this->companyResources->removeElement($companyResource)) {
  1802.                 // set the owning side to null (unless already changed)
  1803.                 if ($companyResource->getCreatedBy() === $this) {
  1804.                     $companyResource->setCreatedBy(null);
  1805.                 }
  1806.             }
  1807.             return $this;
  1808.         }
  1809.         // public function getFilePermissions(): ?FilePermissions
  1810.         // {
  1811.         //     return $this->filePermissions;
  1812.         // }
  1813.         // public function setFilePermissions(?FilePermissions $filePermissions): static
  1814.         // {
  1815.         //     $this->filePermissions = $filePermissions;
  1816.         //     return $this;
  1817.         // }
  1818.         /**
  1819.          * @return Collection<int, ResourceDeliverableHistory>
  1820.          */
  1821.         public function getResourceDeliverableHistories(): Collection
  1822.         {
  1823.             return $this->resourceDeliverableHistories;
  1824.         }
  1825.         public function addResourceDeliverableHistory(ResourceDeliverableHistory $resourceDeliverableHistory): static
  1826.         {
  1827.             if (!$this->resourceDeliverableHistories->contains($resourceDeliverableHistory)) {
  1828.                 $this->resourceDeliverableHistories->add($resourceDeliverableHistory);
  1829.                 $resourceDeliverableHistory->setCreatedBy($this);
  1830.             }
  1831.             return $this;
  1832.         }
  1833.         public function removeResourceDeliverableHistory(ResourceDeliverableHistory $resourceDeliverableHistory): static
  1834.         {
  1835.             if ($this->resourceDeliverableHistories->removeElement($resourceDeliverableHistory)) {
  1836.                 // set the owning side to null (unless already changed)
  1837.                 if ($resourceDeliverableHistory->getCreatedBy() === $this) {
  1838.                     $resourceDeliverableHistory->setCreatedBy(null);
  1839.                 }
  1840.             }
  1841.             return $this;
  1842.         }
  1843.         /**
  1844.          * @return Collection<int, FilesResourceDeliverableHistory>
  1845.          */
  1846.         public function getFilesResourceDeliverableHistories(): Collection
  1847.         {
  1848.             return $this->filesResourceDeliverableHistories;
  1849.         }
  1850.         public function addFilesResourceDeliverableHistory(FilesResourceDeliverableHistory $filesResourceDeliverableHistory): static
  1851.         {
  1852.             if (!$this->filesResourceDeliverableHistories->contains($filesResourceDeliverableHistory)) {
  1853.                 $this->filesResourceDeliverableHistories->add($filesResourceDeliverableHistory);
  1854.                 $filesResourceDeliverableHistory->setCreatedBy($this);
  1855.             }
  1856.             return $this;
  1857.         }
  1858.         public function removeFilesResourceDeliverableHistory(FilesResourceDeliverableHistory $filesResourceDeliverableHistory): static
  1859.         {
  1860.             if ($this->filesResourceDeliverableHistories->removeElement($filesResourceDeliverableHistory)) {
  1861.                 // set the owning side to null (unless already changed)
  1862.                 if ($filesResourceDeliverableHistory->getCreatedBy() === $this) {
  1863.                     $filesResourceDeliverableHistory->setCreatedBy(null);
  1864.                 }
  1865.             }
  1866.             return $this;
  1867.         }
  1868.         /**
  1869.          * @return Collection<int, FilePermissions>
  1870.          */
  1871.         public function getFilePermissions(): Collection
  1872.         {
  1873.             return $this->filePermissions;
  1874.         }
  1875.         public function addFilePermission(FilePermissions $filePermission): static
  1876.         {
  1877.             if (!$this->filePermissions->contains($filePermission)) {
  1878.                 $this->filePermissions->add($filePermission);
  1879.                 $filePermission->addUser($this);
  1880.             }
  1881.             return $this;
  1882.         }
  1883.         public function removeFilePermission(FilePermissions $filePermission): static
  1884.         {
  1885.             if ($this->filePermissions->removeElement($filePermission)) {
  1886.                 $filePermission->removeUser($this);
  1887.             }
  1888.             return $this;
  1889.         }
  1890.         /**
  1891.          * @return Collection<int, FolderPermissions>
  1892.          */
  1893.         public function getFolderPermissions(): Collection
  1894.         {
  1895.             return $this->folderPermissions;
  1896.         }
  1897.         public function addFolderPermission(FolderPermissions $folderPermission): static
  1898.         {
  1899.             if (!$this->folderPermissions->contains($folderPermission)) {
  1900.                 $this->folderPermissions->add($folderPermission);
  1901.                 $folderPermission->addUser($this);
  1902.             }
  1903.             return $this;
  1904.         }
  1905.         public function removeFolderPermission(FolderPermissions $folderPermission): static
  1906.         {
  1907.             if ($this->folderPermissions->removeElement($folderPermission)) {
  1908.                 $folderPermission->removeUser($this);
  1909.             }
  1910.             return $this;
  1911.         }
  1912.         /**
  1913.          * @return Collection<int, FolderPermissions>
  1914.          */
  1915.         public function getFolderPermissionsCreatedBy(): Collection
  1916.         {
  1917.             return $this->folderPermissionsCreatedBy;
  1918.         }
  1919.         public function addFolderPermissionsCreatedBy(FolderPermissions $folderPermissionsCreatedBy): static
  1920.         {
  1921.             if (!$this->folderPermissionsCreatedBy->contains($folderPermissionsCreatedBy)) {
  1922.                 $this->folderPermissionsCreatedBy->add($folderPermissionsCreatedBy);
  1923.                 $folderPermissionsCreatedBy->setCreatedBy($this);
  1924.             }
  1925.             return $this;
  1926.         }
  1927.         public function removeFolderPermissionsCreatedBy(FolderPermissions $folderPermissionsCreatedBy): static
  1928.         {
  1929.             if ($this->folderPermissionsCreatedBy->removeElement($folderPermissionsCreatedBy)) {
  1930.                 // set the owning side to null (unless already changed)
  1931.                 if ($folderPermissionsCreatedBy->getCreatedBy() === $this) {
  1932.                     $folderPermissionsCreatedBy->setCreatedBy(null);
  1933.                 }
  1934.             }
  1935.             return $this;
  1936.         }
  1937.         /**
  1938.          * @return Collection<int, FilePermissions>
  1939.          */
  1940.         public function getFilePermissionsCreatedBy(): Collection
  1941.         {
  1942.             return $this->filePermissionsCreatedBy;
  1943.         }
  1944.         public function addFilePermissionsCreatedBy(FilePermissions $filePermissionsCreatedBy): static
  1945.         {
  1946.             if (!$this->filePermissionsCreatedBy->contains($filePermissionsCreatedBy)) {
  1947.                 $this->filePermissionsCreatedBy->add($filePermissionsCreatedBy);
  1948.                 $filePermissionsCreatedBy->setCreatedBy($this);
  1949.             }
  1950.             return $this;
  1951.         }
  1952.         public function removeFilePermissionsCreatedBy(FilePermissions $filePermissionsCreatedBy): static
  1953.         {
  1954.             if ($this->filePermissionsCreatedBy->removeElement($filePermissionsCreatedBy)) {
  1955.                 // set the owning side to null (unless already changed)
  1956.                 if ($filePermissionsCreatedBy->getCreatedBy() === $this) {
  1957.                     $filePermissionsCreatedBy->setCreatedBy(null);
  1958.                 }
  1959.             }
  1960.             return $this;
  1961.         }
  1962.         public function isAllCompany(): ?bool
  1963.         {
  1964.             return $this->allCompany;
  1965.         }
  1966.         public function isSalary(): ?bool
  1967.         {
  1968.             return $this->salary;
  1969.         }
  1970.         public function isManager(): ?bool
  1971.         {
  1972.             return $this->manager;
  1973.         }
  1974.         public function isPartner(): ?bool
  1975.         {
  1976.             return $this->partner;
  1977.         }
  1978.         public function getMailAlias(): ?array
  1979.         {
  1980.             return $this->mailAlias;
  1981.         }
  1982.         public function setMailAlias(?array $mailAlias): static
  1983.         {
  1984.             $this->mailAlias $mailAlias;
  1985.             return $this;
  1986.         }
  1987.         public function isIsNewClient(): ?bool
  1988.         {
  1989.             return $this->isNewClient;
  1990.         }
  1991.         public function isAcceptPresentation(): ?bool
  1992.         {
  1993.             return $this->acceptPresentation;
  1994.         }
  1995.         public function addCompaniesRepresentative(Company $companiesRepresentative): static
  1996.         {
  1997.             if (!$this->companiesRepresentative->contains($companiesRepresentative)) {
  1998.                 $this->companiesRepresentative->add($companiesRepresentative);
  1999.                 $companiesRepresentative->setRepresentative($this);
  2000.             }
  2001.             return $this;
  2002.         }
  2003.         public function removeCompaniesRepresentative(Company $companiesRepresentative): static
  2004.         {
  2005.             if ($this->companiesRepresentative->removeElement($companiesRepresentative)) {
  2006.                 // set the owning side to null (unless already changed)
  2007.                 if ($companiesRepresentative->getRepresentative() === $this) {
  2008.                     $companiesRepresentative->setRepresentative(null);
  2009.                 }
  2010.             }
  2011.             return $this;
  2012.         }
  2013.         /**
  2014.          * @return Collection<int, noteUser>
  2015.          */
  2016.         public function getNoteUser(): Collection
  2017.         {
  2018.             return $this->noteUser;
  2019.         }
  2020.         public function addNoteUser(noteUser $noteUser): static
  2021.         {
  2022.             if (!$this->noteUser->contains($noteUser)) {
  2023.                 $this->noteUser->add($noteUser);
  2024.                 $noteUser->setUser($this);
  2025.             }
  2026.             return $this;
  2027.         }
  2028.         public function removeNoteUser(noteUser $noteUser): static
  2029.         {
  2030.             if ($this->noteUser->removeElement($noteUser)) {
  2031.                 // set the owning side to null (unless already changed)
  2032.                 if ($noteUser->getUser() === $this) {
  2033.                     $noteUser->setUser(null);
  2034.                 }
  2035.             }
  2036.             return $this;
  2037.         }
  2038.         /**
  2039.          * @return Collection<int, AppPromotion>
  2040.          */
  2041.         public function getAppPromotions(): Collection
  2042.         {
  2043.             return $this->appPromotions;
  2044.         }
  2045.         public function addAppPromotion(AppPromotion $appPromotion): static
  2046.         {
  2047.             if (!$this->appPromotions->contains($appPromotion)) {
  2048.                 $this->appPromotions->add($appPromotion);
  2049.                 $appPromotion->setUser($this);
  2050.             }
  2051.             return $this;
  2052.         }
  2053.         public function removeAppPromotion(AppPromotion $appPromotion): static
  2054.         {
  2055.             if ($this->appPromotions->removeElement($appPromotion)) {
  2056.                 // set the owning side to null (unless already changed)
  2057.                 if ($appPromotion->getUser() === $this) {
  2058.                     $appPromotion->setUser(null);
  2059.                 }
  2060.             }
  2061.             return $this;
  2062.         }
  2063.         public function isShareMyWhatsapp(): ?bool
  2064.         {
  2065.             return $this->shareMyWhatsapp;
  2066.         }
  2067.         public function setShareMyWhatsapp(?bool $shareMyWhatsapp): static
  2068.         {
  2069.             $this->shareMyWhatsapp $shareMyWhatsapp;
  2070.             return $this;
  2071.         }
  2072.         public function getMyWhatsappLink(): ?string
  2073.         {
  2074.             return $this->myWhatsappLink;
  2075.         }
  2076.         public function setMyWhatsappLink(?string $myWhatsappLink): static
  2077.         {
  2078.             $this->myWhatsappLink $myWhatsappLink;
  2079.             return $this;
  2080.         }
  2081.         public function getMyFlowEmail(): ?string
  2082.         {
  2083.             return $this->myFlowEmail;
  2084.         }
  2085.         public function setMyFlowEmail(?string $myFlowEmail): static
  2086.         {
  2087.             $this->myFlowEmail $myFlowEmail;
  2088.             return $this;
  2089.         }
  2090.         
  2091.     
  2092. }