src/Entity/User.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Serializable;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. use JMS\Serializer\Annotation as Serializer;
  12. /**
  13.  * @ORM\Entity(repositoryClass=UserRepository::class)
  14.  * @ORM\Table(name="`user`")
  15.  * @Serializer\ExclusionPolicy("ALL")
  16.  */
  17. #[UniqueEntity(fields: ['email'], message'message="Ce compte existe déjà')]
  18. class User implements UserInterfacePasswordAuthenticatedUserInterfaceSerializable
  19. {
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      * @Serializer\Expose
  25.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "ligth_list", "edit_visitor_profile", "live_details"})
  26.      */
  27.     private $id;
  28.     /**
  29.      * @ORM\Column(type="string", length=180, unique=true)
  30.      * @Serializer\Expose
  31.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "ligth_list", "edit_visitor_profile", "live_details"})
  32.      */
  33.     private $email;
  34.     /**
  35.      * @ORM\Column(type="json")
  36.      */
  37.     private $roles = [];
  38.     /**
  39.      * @var string The hashed password
  40.      * @ORM\Column(type="string", nullable=true)
  41.      */
  42.     private $password;
  43.     /**
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      */
  46.     private $lastLoginAt;
  47.     /**
  48.      * @ORM\Column(type="datetime", nullable=true)
  49.      */
  50.     private $lastLogoutAt;
  51.     /**
  52.      * @ORM\OneToMany(targetEntity=UserOffice::class, mappedBy="user", cascade={"persist", "remove"}, fetch="EXTRA_LAZY")
  53.      */
  54.     private $userOffices;
  55.     /**
  56.      * @ORM\Column(type="text", nullable=true)
  57.      * @Serializer\Expose
  58.      * @Serializer\Groups({"user_profile"})
  59.      */
  60.     private $description;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      * @Serializer\Expose
  64.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "historic", "ligth_list", "edit_visitor_profile", "live_details"})
  65.      */
  66.     private $lastname;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      * @Serializer\Expose
  70.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "historic", "ligth_list", "edit_visitor_profile", "live_details"})
  71.      */
  72.     private $firstname;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity=Experience::class, mappedBy="user", cascade={"persist", "remove"}, fetch="EXTRA_LAZY")
  75.      * @Serializer\Expose
  76.      * @Serializer\Groups({"user_profile"})
  77.      */
  78.     private $userExperiences;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity=Course::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  81.      */
  82.     private $courses;
  83.     /**
  84.      * @ORM\ManyToMany(targetEntity=Role::class, mappedBy="users")
  85.      */
  86.     private $userRoles;
  87.     /**
  88.      * @ORM\OneToMany(targetEntity=Enrollment::class, mappedBy="user", fetch="EXTRA_LAZY")
  89.      */
  90.     private $enrollments;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity=Country::class, inversedBy="users")
  93.      * @Serializer\Expose
  94.      * @Serializer\Groups({"edit_visitor_profile"})
  95.      */
  96.     private $country;
  97.     /**
  98.      * @ORM\Column(type="boolean", nullable=true)
  99.      * @Serializer\Expose
  100.      */
  101.     private $isFirstConnexion true;
  102.     /**
  103.      * @ORM\OneToMany(targetEntity=ModuleView::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  104.      */
  105.     private $moduleViews;
  106.     /**
  107.      * @ORM\OneToMany(targetEntity=ModuleLike::class, mappedBy="user", fetch="EXTRA_LAZY")
  108.      */
  109.     private $moduleLikes;
  110.     /**
  111.      * @ORM\OneToMany(targetEntity=Module::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  112.      */
  113.     private $modulePublishers;
  114.     /**
  115.      * @ORM\OneToMany(targetEntity=UserQuizQuestion::class, mappedBy="user", fetch="EXTRA_LAZY")
  116.      */
  117.     private $userQuizQuestions;
  118.     /**
  119.      * @ORM\OneToMany(targetEntity=Quote::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  120.      */
  121.     private $quotes;
  122.     /**
  123.      * @ORM\OneToMany(targetEntity=Director::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  124.      */
  125.     private $directors;
  126.     /**
  127.      * @ORM\ManyToMany(targetEntity=Module::class, mappedBy="coaches")
  128.      */
  129.     private $modules;
  130.     /**
  131.      * @ORM\ManyToMany(targetEntity=Live::class, mappedBy="coaches")
  132.      */
  133.     private $lives;
  134.     /**
  135.      * @ORM\OneToMany(targetEntity=LiveParticipant::class, mappedBy="participant", fetch="EXTRA_LAZY")
  136.      */
  137.     private $liveParticipants;
  138.     /**
  139.      * @ORM\Column(type="string", length=255, nullable=true)
  140.      */
  141.     private $registrationNumber;
  142.     /**
  143.      * @ORM\Column(type="string", length=255, nullable=true)
  144.      */
  145.     private $hierarchicalLevel;
  146.     /**
  147.      * @ORM\OneToMany(targetEntity=ModuleComment::class, mappedBy="user", fetch="EXTRA_LAZY")
  148.      */
  149.     private $moduleComments;
  150.     /**
  151.      * @ORM\ManyToOne(targetEntity=SubsidiaryCompany::class, inversedBy="users")
  152.      * @Serializer\Expose
  153.      * @Serializer\Groups({"user_profile"})
  154.      */
  155.     private $subsidiaryCompany;
  156.     /**
  157.      * @ORM\ManyToOne(targetEntity=Job::class, inversedBy="users")
  158.      */
  159.     private $job;
  160.     /**
  161.      * @ORM\ManyToOne(targetEntity=Office::class, inversedBy="users")
  162.      * @Serializer\Expose
  163.      * @Serializer\Groups({"user_profile"})
  164.      */
  165.     private $office;
  166.     /**
  167.      * @ORM\ManyToOne(targetEntity=Contract::class, inversedBy="users")
  168.      */
  169.     private $contract;
  170.     /**
  171.      * @ORM\Column(type="string", length=255, nullable=true)
  172.      * @Serializer\Expose
  173.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "live_details"})
  174.      */
  175.     private $phoneNumber;
  176.     /**
  177.      * @ORM\Column(type="string", length=255, nullable=true)
  178.      */
  179.     private $status;
  180.     /**
  181.      * @ORM\Column(type="boolean", nullable=true)
  182.      */
  183.     private $active true;
  184.     /**
  185.      * @ORM\OneToOne(targetEntity=ImageManager::class, cascade={"persist", "remove"})
  186.      * @Serializer\Expose
  187.      * @Serializer\Groups({"user_profile", "live_details"})
  188.      */
  189.     private $photo;
  190.     /**
  191.      * @ORM\Column(type="string", length=255, nullable=true)
  192.      */
  193.     private $referent;
  194.     /**
  195.      * @ORM\Column(type="datetime", nullable=true)
  196.      * @Serializer\Expose
  197.      * @Serializer\Groups({"user_profile"})
  198.      */
  199.     private $entryDate;
  200.     /**
  201.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="responsibles")
  202.      */
  203.     private $responsible;
  204.     /**
  205.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="responsible", fetch="EXTRA_LAZY")
  206.      */
  207.     private $responsibles;
  208.     /**
  209.      * @ORM\OneToMany(targetEntity=ProgramParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  210.      */
  211.     private $programParticipations;
  212.     /**
  213.      * @ORM\OneToMany(targetEntity=ModuleParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  214.      */
  215.     private $moduleParticipations;
  216.     /**
  217.      * @ORM\OneToMany(targetEntity=ModuleInscription::class, mappedBy="user", fetch="EXTRA_LAZY")
  218.      */
  219.     private $moduleInscriptions;
  220.     /**
  221.      * @ORM\Column(type="string", length=255, nullable=true)
  222.      */
  223.     private $activationCode;
  224.     /**
  225.      * @ORM\Column(type="datetime", nullable=true)
  226.      */
  227.     private $activationCodeExpiredAt;
  228.     /**
  229.      * @ORM\Column(type="string", length=255, nullable=true)
  230.      */
  231.     private $resetCode;
  232.     /**
  233.      * @ORM\Column(type="datetime", nullable=true)
  234.      */
  235.     private $resetCodeExpiredAt;
  236.     /**
  237.      * @ORM\Column(type="array", nullable=true)
  238.      */
  239.     private $deviceTokens = [];
  240.     /**
  241.      * @ORM\OneToMany(targetEntity=Discussion::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  242.      */
  243.     private $senderDiscussions;
  244.      /**
  245.      * @ORM\OneToMany(targetEntity=Discussion::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  246.      */
  247.     private $receiverDiscussions;
  248.     /**
  249.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  250.      */
  251.     private $messages;
  252.     /**
  253.      * @ORM\Column(type="boolean")
  254.      */
  255.     private $isVerified true;
  256.     /**
  257.      * @ORM\Column(type="string", length=255, nullable=true)
  258.      */
  259.     private $profileColor;
  260.     /**
  261.      * @ORM\ManyToMany(targetEntity=Program::class, mappedBy="users")
  262.      */
  263.     private $programs;
  264.     /**
  265.      * @ORM\OneToMany(targetEntity=UserModuleParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  266.      */
  267.     private $userModuleParticipations;
  268.     /**
  269.      * @ORM\Column(type="boolean", nullable=true)
  270.      */
  271.     private $isInternalAccount false;
  272.     /**
  273.      * @ORM\Column(type="integer", nullable=true)
  274.      */
  275.     private $elapsedTime;
  276.     /**
  277.      * @ORM\OneToMany(targetEntity=Notification::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  278.      */
  279.     private $notifications;
  280.     /**
  281.      * @ORM\OneToMany(targetEntity=NotificationReceiver::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  282.      */
  283.     private $notificationReceivers;
  284.     /**
  285.      * @ORM\Column(type="datetime", nullable=true)
  286.      */
  287.     private $lastLoginNotifiedAt;
  288.     /**
  289.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  290.      */
  291.     private $receiverMessages;
  292.     /**
  293.      * @ORM\OneToMany(targetEntity=UserQuizParticipation::class, mappedBy="user")
  294.      */
  295.     private $userQuizParticipations;
  296.     /**
  297.      * @ORM\OneToMany(targetEntity=GameTheme::class, mappedBy="createdBy")
  298.      */
  299.     private $gameThemes;
  300.     /**
  301.      * @ORM\OneToMany(targetEntity=AuditLog::class, mappedBy="user")
  302.      */
  303.     private $logs;
  304.     /**
  305.      * @ORM\OneToMany(targetEntity=GameResourceContent::class, mappedBy="createdBy")
  306.      */
  307.     private $gameResourceContents;
  308.     /**
  309.      * @ORM\OneToMany(targetEntity=GameSession::class, mappedBy="user")
  310.      */
  311.     private $gameSessions;
  312.     /**
  313.      * @ORM\OneToMany(targetEntity=GameSessionItem::class, mappedBy="player")
  314.      */
  315.     private $gameSessionItems;
  316.     public function __construct()
  317.     {
  318.         $this->userOffices = new ArrayCollection();
  319.         $this->userExperiences = new ArrayCollection();
  320.         $this->courses = new ArrayCollection();
  321.         $this->userRoles = new ArrayCollection();
  322.         $this->enrollments = new ArrayCollection();
  323.         $this->moduleViews = new ArrayCollection();
  324.         $this->moduleLikes = new ArrayCollection();
  325.         $this->modulePublishers = new ArrayCollection();
  326.         $this->userQuizQuestions = new ArrayCollection();
  327.         $this->quotes = new ArrayCollection();
  328.         $this->directors = new ArrayCollection();
  329.         $this->modules = new ArrayCollection();
  330.         $this->lives = new ArrayCollection();
  331.         $this->liveParticipants = new ArrayCollection();
  332.         $this->moduleComments = new ArrayCollection();
  333.         $this->responsibles = new ArrayCollection();
  334.         $this->programParticipations = new ArrayCollection();
  335.         $this->moduleParticipations = new ArrayCollection();
  336.         $this->moduleInscriptions = new ArrayCollection();
  337.         $this->senderDiscussions = new ArrayCollection();
  338.         $this->receiverDiscussions = new ArrayCollection();
  339.         $this->messages = new ArrayCollection();
  340.         $this->programs = new ArrayCollection();
  341.         $this->userModuleParticipations = new ArrayCollection();
  342.         $this->notifications = new ArrayCollection();
  343.         $this->notificationReceivers = new ArrayCollection();
  344.         $this->receiverMessages = new ArrayCollection();
  345.         $this->userQuizParticipations = new ArrayCollection();
  346.         $this->gameThemes = new ArrayCollection();
  347.         $this->logs = new ArrayCollection();
  348.         $this->gameResourceContents = new ArrayCollection();
  349.         $this->gameSessions = new ArrayCollection();
  350.         $this->gameSessionItems = new ArrayCollection();
  351.     }
  352.     public function getId(): ?int
  353.     {
  354.         return $this->id;
  355.     }
  356.     public function getEmail(): ?string
  357.     {
  358.         return $this->email;
  359.     }
  360.     public function setEmail(string $email): self
  361.     {
  362.         $this->email $email;
  363.         return $this;
  364.     }
  365.     /**
  366.      * A visual identifier that represents this user.
  367.      *
  368.      * @see UserInterface
  369.      */
  370.     public function getUserIdentifier(): string
  371.     {
  372.         return (string) $this->email;
  373.     }
  374.     /**
  375.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  376.      */
  377.     public function getUsername(): string
  378.     {
  379.         return (string) $this->email;
  380.     }
  381.     /**
  382.      * @see UserInterface
  383.      */
  384.     public function getRoles(): array
  385.     {
  386.         $roles $this->roles;
  387.         // guarantee every user at least has ROLE_USER
  388.         $roles[] = 'ROLE_USER';
  389.         return array_unique($roles);
  390.     }
  391.     public function setRoles(array $roles): self
  392.     {
  393.         $this->roles $roles;
  394.         return $this;
  395.     }
  396.     /**
  397.      * @see PasswordAuthenticatedUserInterface
  398.      */
  399.     public function getPassword(): ?string
  400.     {
  401.         return $this->password;
  402.     }
  403.     public function setPassword(?string $password): self
  404.     {
  405.         $this->password $password;
  406.         return $this;
  407.     }
  408.     /**
  409.      * Returning a salt is only needed, if you are not using a modern
  410.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  411.      *
  412.      * @see UserInterface
  413.      */
  414.     public function getSalt(): ?string
  415.     {
  416.         return null;
  417.     }
  418.     /**
  419.      * @see UserInterface
  420.      */
  421.     public function eraseCredentials()
  422.     {
  423.         // If you store any temporary, sensitive data on the user, clear it here
  424.         // $this->plainPassword = null;
  425.     }
  426.     public function getLastLoginAt(): ?\DateTimeInterface
  427.     {
  428.         return $this->lastLoginAt;
  429.     }
  430.     public function setLastLoginAt(?\DateTimeInterface $lastLoginAt): self
  431.     {
  432.         $this->lastLoginAt $lastLoginAt;
  433.         return $this;
  434.     }
  435.     public function getLastLogoutAt(): ?\DateTimeInterface
  436.     {
  437.         return $this->lastLogoutAt;
  438.     }
  439.     public function setLastLogoutAt(?\DateTimeInterface $lastLogoutAt): self
  440.     {
  441.         $this->lastLogoutAt $lastLogoutAt;
  442.         return $this;
  443.     }
  444.     /**
  445.      * @return Collection<int, UserOffice>
  446.      */
  447.     public function getUserOffices(): Collection
  448.     {
  449.         return $this->userOffices;
  450.     }
  451.     public function addUserOffice(UserOffice $userOffice): self
  452.     {
  453.         if (!$this->userOffices->contains($userOffice)) {
  454.             $this->userOffices[] = $userOffice;
  455.             $userOffice->setUser($this);
  456.         }
  457.         return $this;
  458.     }
  459.     public function removeUserOffice(UserOffice $userOffice): self
  460.     {
  461.         if ($this->userOffices->removeElement($userOffice)) {
  462.             // set the owning side to null (unless already changed)
  463.             if ($userOffice->getUser() === $this) {
  464.                 $userOffice->setUser(null);
  465.             }
  466.         }
  467.         return $this;
  468.     }
  469.     public function getDescription(): ?string
  470.     {
  471.         return $this->description;
  472.     }
  473.     public function setDescription(?string $description): self
  474.     {
  475.         $this->description $description;
  476.         return $this;
  477.     }
  478.     public function getLastname(): ?string
  479.     {
  480.         return $this->lastname;
  481.     }
  482.     public function setLastname(?string $lastname): self
  483.     {
  484.         $this->lastname $lastname;
  485.         return $this;
  486.     }
  487.     public function getFirstname(): ?string
  488.     {
  489.         return $this->firstname;
  490.     }
  491.     public function setFirstname(?string $firstname): self
  492.     {
  493.         $this->firstname $firstname;
  494.         return $this;
  495.     }
  496.     public function getFullname(): ?string
  497.     {
  498.         return $this->getFirstname().' '.$this->getLastname();
  499.     }
  500.     /**
  501.      * @return Collection<int, Experience>
  502.      */
  503.     public function getUserExperiences(): Collection
  504.     {
  505.         return $this->userExperiences;
  506.     }
  507.     public function addUserExperience(Experience $userExperience): self
  508.     {
  509.         if (!$this->userExperiences->contains($userExperience)) {
  510.             $this->userExperiences[] = $userExperience;
  511.             $userExperience->setUser($this);
  512.         }
  513.         return $this;
  514.     }
  515.     public function removeUserExperience(Experience $userExperience): self
  516.     {
  517.         if ($this->userExperiences->removeElement($userExperience)) {
  518.             // set the owning side to null (unless already changed)
  519.             if ($userExperience->getUser() === $this) {
  520.                 $userExperience->setUser(null);
  521.             }
  522.         }
  523.         return $this;
  524.     }
  525.     /**
  526.      * @return Collection<int, Course>
  527.      */
  528.     public function getCourses(): Collection
  529.     {
  530.         return $this->courses;
  531.     }
  532.     public function addCourse(Course $course): self
  533.     {
  534.         if (!$this->courses->contains($course)) {
  535.             $this->courses[] = $course;
  536.             $course->setPublishedBy($this);
  537.         }
  538.         return $this;
  539.     }
  540.     public function removeCourse(Course $course): self
  541.     {
  542.         if ($this->courses->removeElement($course)) {
  543.             // set the owning side to null (unless already changed)
  544.             if ($course->getPublishedBy() === $this) {
  545.                 $course->setPublishedBy(null);
  546.             }
  547.         }
  548.         return $this;
  549.     }
  550.     /**
  551.      * @return Collection<int, Role>
  552.      */
  553.     public function getUserRoles(): Collection
  554.     {
  555.         return $this->userRoles;
  556.     }
  557.     public function addUserRole(Role $userRole): self
  558.     {
  559.         if (!$this->userRoles->contains($userRole)) {
  560.             $this->userRoles[] = $userRole;
  561.             $userRole->addUser($this);
  562.         }
  563.         return $this;
  564.     }
  565.     public function removeUserRole(Role $userRole): self
  566.     {
  567.         if ($this->userRoles->removeElement($userRole)) {
  568.             $userRole->removeUser($this);
  569.         }
  570.         return $this;
  571.     }
  572.     /**
  573.      * @return Collection<int, Enrollment>
  574.      */
  575.     public function getEnrollments(): Collection
  576.     {
  577.         return $this->enrollments;
  578.     }
  579.     public function addEnrollment(Enrollment $enrollment): self
  580.     {
  581.         if (!$this->enrollments->contains($enrollment)) {
  582.             $this->enrollments[] = $enrollment;
  583.             $enrollment->setUser($this);
  584.         }
  585.         return $this;
  586.     }
  587.     public function removeEnrollment(Enrollment $enrollment): self
  588.     {
  589.         if ($this->enrollments->removeElement($enrollment)) {
  590.             // set the owning side to null (unless already changed)
  591.             if ($enrollment->getUser() === $this) {
  592.                 $enrollment->setUser(null);
  593.             }
  594.         }
  595.         return $this;
  596.     }
  597.     public function getCountry(): ?Country
  598.     {
  599.         return $this->country;
  600.     }
  601.     public function setCountry(?Country $country): self
  602.     {
  603.         $this->country $country;
  604.         return $this;
  605.     }
  606.     public function isIsFirstConnexion(): ?bool
  607.     {
  608.         return $this->isFirstConnexion;
  609.     }
  610.     public function setIsFirstConnexion(?bool $isFirstConnexion): self
  611.     {
  612.         $this->isFirstConnexion $isFirstConnexion;
  613.         return $this;
  614.     }
  615.     /**
  616.      * @return Collection<int, ModuleView>
  617.      */
  618.     public function getModuleViews(): Collection
  619.     {
  620.         return $this->moduleViews;
  621.     }
  622.     public function addModuleView(ModuleView $moduleView): self
  623.     {
  624.         if (!$this->moduleViews->contains($moduleView)) {
  625.             $this->moduleViews[] = $moduleView;
  626.             $moduleView->setCreatedBy($this);
  627.         }
  628.         return $this;
  629.     }
  630.     public function removeModuleView(ModuleView $moduleView): self
  631.     {
  632.         if ($this->moduleViews->removeElement($moduleView)) {
  633.             // set the owning side to null (unless already changed)
  634.             if ($moduleView->getCreatedBy() === $this) {
  635.                 $moduleView->setCreatedBy(null);
  636.             }
  637.         }
  638.         return $this;
  639.     }
  640.     /**
  641.      * @return Collection<int, ModuleLike>
  642.      */
  643.     public function getModuleLikes(): Collection
  644.     {
  645.         return $this->moduleLikes;
  646.     }
  647.     public function addModuleLike(ModuleLike $moduleLike): self
  648.     {
  649.         if (!$this->moduleLikes->contains($moduleLike)) {
  650.             $this->moduleLikes[] = $moduleLike;
  651.             $moduleLike->setUser($this);
  652.         }
  653.         return $this;
  654.     }
  655.     public function removeModuleLike(ModuleLike $moduleLike): self
  656.     {
  657.         if ($this->moduleLikes->removeElement($moduleLike)) {
  658.             // set the owning side to null (unless already changed)
  659.             if ($moduleLike->getUser() === $this) {
  660.                 $moduleLike->setUser(null);
  661.             }
  662.         }
  663.         return $this;
  664.     }
  665.     /**
  666.      * @return Collection<int, Module>
  667.      */
  668.     public function getModulePublishers(): Collection
  669.     {
  670.         return $this->modulePublishers;
  671.     }
  672.     public function addModulePublisher(Module $modulePublisher): self
  673.     {
  674.         if (!$this->modulePublishers->contains($modulePublisher)) {
  675.             $this->modulePublishers[] = $modulePublisher;
  676.             $modulePublisher->setPublishedBy($this);
  677.         }
  678.         return $this;
  679.     }
  680.     public function removeModulePublisher(Module $modulePublisher): self
  681.     {
  682.         if ($this->modulePublishers->removeElement($modulePublisher)) {
  683.             // set the owning side to null (unless already changed)
  684.             if ($modulePublisher->getPublishedBy() === $this) {
  685.                 $modulePublisher->setPublishedBy(null);
  686.             }
  687.         }
  688.         return $this;
  689.     }
  690.     /**
  691.      * @return Collection<int, UserQuizQuestion>
  692.      */
  693.     public function getUserQuizQuestions(): Collection
  694.     {
  695.         return $this->userQuizQuestions;
  696.     }
  697.     public function addUserQuizQuestion(UserQuizQuestion $userQuizQuestion): self
  698.     {
  699.         if (!$this->userQuizQuestions->contains($userQuizQuestion)) {
  700.             $this->userQuizQuestions[] = $userQuizQuestion;
  701.             $userQuizQuestion->setCreatedBy($this);
  702.         }
  703.         return $this;
  704.     }
  705.     public function removeUserQuizQuestion(UserQuizQuestion $userQuizQuestion): self
  706.     {
  707.         if ($this->userQuizQuestions->removeElement($userQuizQuestion)) {
  708.             // set the owning side to null (unless already changed)
  709.             if ($userQuizQuestion->getCreatedBy() === $this) {
  710.                 $userQuizQuestion->setCreatedBy(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return Collection<int, Quote>
  717.      */
  718.     public function getQuotes(): Collection
  719.     {
  720.         return $this->quotes;
  721.     }
  722.     public function addQuote(Quote $quote): self
  723.     {
  724.         if (!$this->quotes->contains($quote)) {
  725.             $this->quotes[] = $quote;
  726.             $quote->setPublishedBy($this);
  727.         }
  728.         return $this;
  729.     }
  730.     public function removeQuote(Quote $quote): self
  731.     {
  732.         if ($this->quotes->removeElement($quote)) {
  733.             // set the owning side to null (unless already changed)
  734.             if ($quote->getPublishedBy() === $this) {
  735.                 $quote->setPublishedBy(null);
  736.             }
  737.         }
  738.         return $this;
  739.     }
  740.     /**
  741.      * @return Collection<int, Director>
  742.      */
  743.     public function getDirectors(): Collection
  744.     {
  745.         return $this->directors;
  746.     }
  747.     public function addDirector(Director $director): self
  748.     {
  749.         if (!$this->directors->contains($director)) {
  750.             $this->directors[] = $director;
  751.             $director->setPublishedBy($this);
  752.         }
  753.         return $this;
  754.     }
  755.     public function removeDirector(Director $director): self
  756.     {
  757.         if ($this->directors->removeElement($director)) {
  758.             // set the owning side to null (unless already changed)
  759.             if ($director->getPublishedBy() === $this) {
  760.                 $director->setPublishedBy(null);
  761.             }
  762.         }
  763.         return $this;
  764.     }
  765.     /**
  766.      * @return Collection<int, Module>
  767.      */
  768.     public function getModules(): Collection
  769.     {
  770.         return $this->modules;
  771.     }
  772.     public function addModule(Module $module): self
  773.     {
  774.         if (!$this->modules->contains($module)) {
  775.             $this->modules[] = $module;
  776.             $module->addCoach($this);
  777.         }
  778.         return $this;
  779.     }
  780.     public function removeModule(Module $module): self
  781.     {
  782.         if ($this->modules->removeElement($module)) {
  783.             $module->removeCoach($this);
  784.         }
  785.         return $this;
  786.     }
  787.     /**
  788.      * @return Collection<int, Live>
  789.      */
  790.     public function getLives(): Collection
  791.     {
  792.         return $this->lives;
  793.     }
  794.     public function addLife(Live $life): self
  795.     {
  796.         if (!$this->lives->contains($life)) {
  797.             $this->lives[] = $life;
  798.             $life->addCoach($this);
  799.         }
  800.         return $this;
  801.     }
  802.     public function removeLife(Live $life): self
  803.     {
  804.         if ($this->lives->removeElement($life)) {
  805.             $life->removeCoach($this);
  806.         }
  807.         return $this;
  808.     }
  809.     /**
  810.      * @return Collection<int, LiveParticipant>
  811.      */
  812.     public function getLiveParticipants(): Collection
  813.     {
  814.         return $this->liveParticipants;
  815.     }
  816.     public function addLiveParticipant(LiveParticipant $liveParticipant): self
  817.     {
  818.         if (!$this->liveParticipants->contains($liveParticipant)) {
  819.             $this->liveParticipants[] = $liveParticipant;
  820.             $liveParticipant->setParticipant($this);
  821.         }
  822.         return $this;
  823.     }
  824.     public function removeLiveParticipant(LiveParticipant $liveParticipant): self
  825.     {
  826.         if ($this->liveParticipants->removeElement($liveParticipant)) {
  827.             // set the owning side to null (unless already changed)
  828.             if ($liveParticipant->getParticipant() === $this) {
  829.                 $liveParticipant->setParticipant(null);
  830.             }
  831.         }
  832.         return $this;
  833.     }
  834.     public function getRegistrationNumber(): ?string
  835.     {
  836.         return $this->registrationNumber;
  837.     }
  838.     public function setRegistrationNumber(?string $registrationNumber): self
  839.     {
  840.         $this->registrationNumber $registrationNumber;
  841.         return $this;
  842.     }
  843.     public function getHierarchicalLevel(): ?string
  844.     {
  845.         return $this->hierarchicalLevel;
  846.     }
  847.     public function setHierarchicalLevel(?string $hierarchicalLevel): self
  848.     {
  849.         $this->hierarchicalLevel $hierarchicalLevel;
  850.         return $this;
  851.     }
  852.     /**
  853.      * @return Collection<int, ModuleComment>
  854.      */
  855.     public function getModuleComments(): Collection
  856.     {
  857.         return $this->moduleComments;
  858.     }
  859.     public function addModuleComment(ModuleComment $moduleComment): self
  860.     {
  861.         if (!$this->moduleComments->contains($moduleComment)) {
  862.             $this->moduleComments[] = $moduleComment;
  863.             $moduleComment->setUser($this);
  864.         }
  865.         return $this;
  866.     }
  867.     public function removeModuleComment(ModuleComment $moduleComment): self
  868.     {
  869.         if ($this->moduleComments->removeElement($moduleComment)) {
  870.             // set the owning side to null (unless already changed)
  871.             if ($moduleComment->getUser() === $this) {
  872.                 $moduleComment->setUser(null);
  873.             }
  874.         }
  875.         return $this;
  876.     }
  877.     public function getSubsidiaryCompany(): ?SubsidiaryCompany
  878.     {
  879.         return $this->subsidiaryCompany;
  880.     }
  881.     public function setSubsidiaryCompany(?SubsidiaryCompany $subsidiaryCompany): self
  882.     {
  883.         $this->subsidiaryCompany $subsidiaryCompany;
  884.         return $this;
  885.     }
  886.     public function getJob(): ?Job
  887.     {
  888.         return $this->job;
  889.     }
  890.     public function setJob(?Job $job): self
  891.     {
  892.         $this->job $job;
  893.         return $this;
  894.     }
  895.     public function getOffice(): ?Office
  896.     {
  897.         return $this->office;
  898.     }
  899.     public function setOffice(?Office $office): self
  900.     {
  901.         $this->office $office;
  902.         return $this;
  903.     }
  904.     public function getContract(): ?Contract
  905.     {
  906.         return $this->contract;
  907.     }
  908.     public function setContract(?Contract $contract): self
  909.     {
  910.         $this->contract $contract;
  911.         return $this;
  912.     }
  913.     public function getPhoneNumber(): ?string
  914.     {
  915.         return $this->phoneNumber;
  916.     }
  917.     public function setPhoneNumber(?string $phoneNumber): self
  918.     {
  919.         $this->phoneNumber $phoneNumber;
  920.         return $this;
  921.     }
  922.     public function getStatus(): ?string
  923.     {
  924.         return $this->status;
  925.     }
  926.     public function setStatus(?string $status): self
  927.     {
  928.         $this->status $status;
  929.         return $this;
  930.     }
  931.     public function isActive(): ?bool
  932.     {
  933.         return $this->active;
  934.     }
  935.     public function setActive(?bool $active): self
  936.     {
  937.         $this->active $active;
  938.         return $this;
  939.     }
  940.     public function getPhoto(): ?ImageManager
  941.     {
  942.         return $this->photo;
  943.     }
  944.     public function setPhoto(?ImageManager $photo): self
  945.     {
  946.         $this->photo $photo;
  947.         return $this;
  948.     }
  949.     public function getReferent(): ?string
  950.     {
  951.         return $this->referent;
  952.     }
  953.     public function setReferent(?string $referent): self
  954.     {
  955.         $this->referent $referent;
  956.         return $this;
  957.     }
  958.     public function getEntryDate(): ?\DateTimeInterface
  959.     {
  960.         return $this->entryDate;
  961.     }
  962.     public function setEntryDate(?\DateTimeInterface $entryDate): self
  963.     {
  964.         $this->entryDate $entryDate;
  965.         return $this;
  966.     }
  967.     public function getResponsible(): ?self
  968.     {
  969.         return $this->responsible;
  970.     }
  971.     public function setResponsible(?self $responsible): self
  972.     {
  973.         $this->responsible $responsible;
  974.         return $this;
  975.     }
  976.     /**
  977.      * @return Collection<int, self>
  978.      */
  979.     public function getResponsibles(): Collection
  980.     {
  981.         return $this->responsibles;
  982.     }
  983.     public function addResponsible(self $responsible): self
  984.     {
  985.         if (!$this->responsibles->contains($responsible)) {
  986.             $this->responsibles[] = $responsible;
  987.             $responsible->setResponsible($this);
  988.         }
  989.         return $this;
  990.     }
  991.     public function removeResponsible(self $responsible): self
  992.     {
  993.         if ($this->responsibles->removeElement($responsible)) {
  994.             // set the owning side to null (unless already changed)
  995.             if ($responsible->getResponsible() === $this) {
  996.                 $responsible->setResponsible(null);
  997.             }
  998.         }
  999.         return $this;
  1000.     }
  1001.     /**
  1002.      * @return Collection<int, ProgramParticipation>
  1003.      */
  1004.     public function getProgramParticipations(): Collection
  1005.     {
  1006.         return $this->programParticipations;
  1007.     }
  1008.     public function addProgramParticipation(ProgramParticipation $programParticipation): self
  1009.     {
  1010.         if (!$this->programParticipations->contains($programParticipation)) {
  1011.             $this->programParticipations[] = $programParticipation;
  1012.             $programParticipation->setCreatedBy($this);
  1013.         }
  1014.         return $this;
  1015.     }
  1016.     public function removeProgramParticipation(ProgramParticipation $programParticipation): self
  1017.     {
  1018.         if ($this->programParticipations->removeElement($programParticipation)) {
  1019.             // set the owning side to null (unless already changed)
  1020.             if ($programParticipation->getCreatedBy() === $this) {
  1021.                 $programParticipation->setCreatedBy(null);
  1022.             }
  1023.         }
  1024.         return $this;
  1025.     }
  1026.     /**
  1027.      * @return Collection<int, ModuleParticipation>
  1028.      */
  1029.     public function getModuleParticipations(): Collection
  1030.     {
  1031.         return $this->moduleParticipations;
  1032.     }
  1033.     public function addModuleParticipation(ModuleParticipation $moduleParticipation): self
  1034.     {
  1035.         if (!$this->moduleParticipations->contains($moduleParticipation)) {
  1036.             $this->moduleParticipations[] = $moduleParticipation;
  1037.             $moduleParticipation->setCreatedBy($this);
  1038.         }
  1039.         return $this;
  1040.     }
  1041.     public function removeModuleParticipation(ModuleParticipation $moduleParticipation): self
  1042.     {
  1043.         if ($this->moduleParticipations->removeElement($moduleParticipation)) {
  1044.             // set the owning side to null (unless already changed)
  1045.             if ($moduleParticipation->getCreatedBy() === $this) {
  1046.                 $moduleParticipation->setCreatedBy(null);
  1047.             }
  1048.         }
  1049.         return $this;
  1050.     }
  1051.     /**
  1052.      * @return Collection<int, ModuleInscription>
  1053.      */
  1054.     public function getModuleInscriptions(): Collection
  1055.     {
  1056.         return $this->moduleInscriptions;
  1057.     }
  1058.     public function addModuleInscription(ModuleInscription $moduleInscription): self
  1059.     {
  1060.         if (!$this->moduleInscriptions->contains($moduleInscription)) {
  1061.             $this->moduleInscriptions[] = $moduleInscription;
  1062.             $moduleInscription->setUser($this);
  1063.         }
  1064.         return $this;
  1065.     }
  1066.     public function removeModuleInscription(ModuleInscription $moduleInscription): self
  1067.     {
  1068.         if ($this->moduleInscriptions->removeElement($moduleInscription)) {
  1069.             // set the owning side to null (unless already changed)
  1070.             if ($moduleInscription->getUser() === $this) {
  1071.                 $moduleInscription->setUser(null);
  1072.             }
  1073.         }
  1074.         return $this;
  1075.     }
  1076.     /** @see \Serializable::serialize() */
  1077.     public function serialize()
  1078.     {
  1079.          return serialize(array(
  1080.              $this->id,
  1081.              $this->email,
  1082.              $this->password,
  1083.              // see section on salt below
  1084.              // $this->salt,
  1085.          ));
  1086.     }
  1087.     /** @see \Serializable::serialize() */
  1088.     public function __serialize()
  1089.     {
  1090.          return array(
  1091.              $this->id,
  1092.              $this->email,
  1093.              $this->password,
  1094.              // see section on salt below
  1095.              // $this->salt,
  1096.          );
  1097.     }
  1098.  
  1099.     /** @see \Serializable::unserialize() */
  1100.     public function unserialize($serialized)
  1101.     {
  1102.          list (
  1103.              $this->id,
  1104.              $this->email,
  1105.              $this->password,
  1106.              // see section on salt below
  1107.              // $this->salt
  1108.          ) = unserialize($serialized);
  1109.     }
  1110.     /** @see \Serializable::unserialize() */
  1111.     public function __unserialize($serialized)
  1112.     {
  1113.          list (
  1114.              $this->id,
  1115.              $this->email,
  1116.              $this->password,
  1117.              // see section on salt below
  1118.              // $this->salt
  1119.          ) = unserialize(serialize($serialized));
  1120.     }
  1121.     public function getActivationCode(): ?string
  1122.     {
  1123.         return $this->activationCode;
  1124.     }
  1125.     public function setActivationCode(?string $activationCode): self
  1126.     {
  1127.         $this->activationCode $activationCode;
  1128.         return $this;
  1129.     }
  1130.     public function getActivationCodeExpiredAt(): ?\DateTimeInterface
  1131.     {
  1132.         return $this->activationCodeExpiredAt;
  1133.     }
  1134.     public function setActivationCodeExpiredAt(?\DateTimeInterface $activationCodeExpiredAt): self
  1135.     {
  1136.         $this->activationCodeExpiredAt $activationCodeExpiredAt;
  1137.         return $this;
  1138.     }
  1139.     public function getResetCode(): ?string
  1140.     {
  1141.         return $this->resetCode;
  1142.     }
  1143.     public function setResetCode(?string $resetCode): self
  1144.     {
  1145.         $this->resetCode $resetCode;
  1146.         return $this;
  1147.     }
  1148.     public function getResetCodeExpiredAt(): ?\DateTimeInterface
  1149.     {
  1150.         return $this->resetCodeExpiredAt;
  1151.     }
  1152.     public function setResetCodeExpiredAt(?\DateTimeInterface $resetCodeExpiredAt): self
  1153.     {
  1154.         $this->resetCodeExpiredAt $resetCodeExpiredAt;
  1155.         return $this;
  1156.     }
  1157.     public function getDeviceTokens(): ?array
  1158.     {
  1159.         return $this->deviceTokens;
  1160.     }
  1161.     public function setDeviceTokens(?array $deviceTokens): self
  1162.     {
  1163.         $this->deviceTokens $deviceTokens;
  1164.         return $this;
  1165.     }
  1166.     /**
  1167.      * @return Collection<int, Discussion>
  1168.      */
  1169.     public function getSenderDiscussions(): Collection
  1170.     {
  1171.         return $this->senderDiscussions;
  1172.     }
  1173.     public function addSenderDiscussion(Discussion $senderDiscussion): self
  1174.     {
  1175.         if (!$this->senderDiscussions->contains($senderDiscussion)) {
  1176.             $this->senderDiscussions[] = $senderDiscussion;
  1177.             $senderDiscussion->setCreatedBy($this);
  1178.         }
  1179.         return $this;
  1180.     }
  1181.     public function removeSenderDiscussion(Discussion $senderDiscussion): self
  1182.     {
  1183.         if ($this->senderDiscussions->removeElement($senderDiscussion)) {
  1184.             // set the owning side to null (unless already changed)
  1185.             if ($senderDiscussion->getCreatedBy() === $this) {
  1186.                 $senderDiscussion->setCreatedBy(null);
  1187.             }
  1188.         }
  1189.         return $this;
  1190.     }
  1191.     /**
  1192.      * @return Collection<int, Discussion>
  1193.      */
  1194.     public function getReceiverDiscussions(): Collection
  1195.     {
  1196.         return $this->receiverDiscussions;
  1197.     }
  1198.     public function addReceiverDiscussion(Discussion $receiverDiscussion): self
  1199.     {
  1200.         if (!$this->receiverDiscussions->contains($receiverDiscussion)) {
  1201.             $this->receiverDiscussions[] = $receiverDiscussion;
  1202.             $receiverDiscussion->setCreatedBy($this);
  1203.         }
  1204.         return $this;
  1205.     }
  1206.     public function removeReceiverDiscussion(Discussion $receiverDiscussion): self
  1207.     {
  1208.         if ($this->receiverDiscussions->removeElement($receiverDiscussion)) {
  1209.             // set the owning side to null (unless already changed)
  1210.             if ($receiverDiscussion->getCreatedBy() === $this) {
  1211.                 $receiverDiscussion->setCreatedBy(null);
  1212.             }
  1213.         }
  1214.         return $this;
  1215.     }
  1216.     /**
  1217.      * @return Collection<int, Message>
  1218.      */
  1219.     public function getMessages(): Collection
  1220.     {
  1221.         return $this->messages;
  1222.     }
  1223.     public function addMessage(Message $message): self
  1224.     {
  1225.         if (!$this->messages->contains($message)) {
  1226.             $this->messages[] = $message;
  1227.             $message->setReceiver($this);
  1228.         }
  1229.         return $this;
  1230.     }
  1231.     public function removeMessage(Message $message): self
  1232.     {
  1233.         if ($this->messages->removeElement($message)) {
  1234.             // set the owning side to null (unless already changed)
  1235.             if ($message->getReceiver() === $this) {
  1236.                 $message->setReceiver(null);
  1237.             }
  1238.         }
  1239.         return $this;
  1240.     }
  1241.     public function isVerified(): bool
  1242.     {
  1243.         return $this->isVerified;
  1244.     }
  1245.     public function setIsVerified(bool $isVerified): self
  1246.     {
  1247.         $this->isVerified $isVerified;
  1248.         return $this;
  1249.     }
  1250.     public function getProfileColor(): ?string
  1251.     {
  1252.         return $this->profileColor;
  1253.     }
  1254.     public function setProfileColor(?string $profileColor): self
  1255.     {
  1256.         $this->profileColor $profileColor;
  1257.         return $this;
  1258.     }
  1259.     /**
  1260.      * @return Collection<int, Program>
  1261.      */
  1262.     public function getPrograms(): Collection
  1263.     {
  1264.         return $this->programs;
  1265.     }
  1266.     public function addProgram(Program $program): self
  1267.     {
  1268.         if (!$this->programs->contains($program)) {
  1269.             $this->programs[] = $program;
  1270.             $program->addUser($this);
  1271.         }
  1272.         return $this;
  1273.     }
  1274.     public function removeProgram(Program $program): self
  1275.     {
  1276.         if ($this->programs->removeElement($program)) {
  1277.             $program->removeUser($this);
  1278.         }
  1279.         return $this;
  1280.     }
  1281.     /**
  1282.      * @return Collection<int, UserModuleParticipation>
  1283.      */
  1284.     public function getUserModuleParticipations(): Collection
  1285.     {
  1286.         return $this->userModuleParticipations;
  1287.     }
  1288.     public function addUserModuleParticipation(UserModuleParticipation $userModuleParticipation): self
  1289.     {
  1290.         if (!$this->userModuleParticipations->contains($userModuleParticipation)) {
  1291.             $this->userModuleParticipations[] = $userModuleParticipation;
  1292.             $userModuleParticipation->setParticipant($this);
  1293.         }
  1294.         return $this;
  1295.     }
  1296.     public function removeUserModuleParticipation(UserModuleParticipation $userModuleParticipation): self
  1297.     {
  1298.         if ($this->userModuleParticipations->removeElement($userModuleParticipation)) {
  1299.             // set the owning side to null (unless already changed)
  1300.             if ($userModuleParticipation->getParticipant() === $this) {
  1301.                 $userModuleParticipation->setParticipant(null);
  1302.             }
  1303.         }
  1304.         return $this;
  1305.     }
  1306.     public function isIsInternalAccount(): ?bool
  1307.     {
  1308.         return $this->isInternalAccount;
  1309.     }
  1310.     public function setIsInternalAccount(?bool $isInternalAccount): self
  1311.     {
  1312.         $this->isInternalAccount $isInternalAccount;
  1313.         return $this;
  1314.     }
  1315.     public function getElapsedTime(): ?int
  1316.     {
  1317.         return $this->elapsedTime;
  1318.     }
  1319.     public function setElapsedTime(?int $elapsedTime): self
  1320.     {
  1321.         $this->elapsedTime $elapsedTime;
  1322.         return $this;
  1323.     }
  1324.     /**
  1325.      * @return Collection<int, Notification>
  1326.      */
  1327.     public function getNotifications(): Collection
  1328.     {
  1329.         return $this->notifications;
  1330.     }
  1331.     public function addNotification(Notification $notification): self
  1332.     {
  1333.         if (!$this->notifications->contains($notification)) {
  1334.             $this->notifications[] = $notification;
  1335.             $notification->setReceiver($this);
  1336.         }
  1337.         return $this;
  1338.     }
  1339.     public function removeNotification(Notification $notification): self
  1340.     {
  1341.         if ($this->notifications->removeElement($notification)) {
  1342.             // set the owning side to null (unless already changed)
  1343.             if ($notification->getReceiver() === $this) {
  1344.                 $notification->setReceiver(null);
  1345.             }
  1346.         }
  1347.         return $this;
  1348.     }
  1349.     /**
  1350.      * @return Collection<int, NotificationReceiver>
  1351.      */
  1352.     public function getNotificationReceivers(): Collection
  1353.     {
  1354.         return $this->notificationReceivers;
  1355.     }
  1356.     public function addNotificationReceiver(NotificationReceiver $notificationReceiver): self
  1357.     {
  1358.         if (!$this->notificationReceivers->contains($notificationReceiver)) {
  1359.             $this->notificationReceivers[] = $notificationReceiver;
  1360.             $notificationReceiver->setReceiver($this);
  1361.         }
  1362.         return $this;
  1363.     }
  1364.     public function removeNotificationReceiver(NotificationReceiver $notificationReceiver): self
  1365.     {
  1366.         if ($this->notificationReceivers->removeElement($notificationReceiver)) {
  1367.             // set the owning side to null (unless already changed)
  1368.             if ($notificationReceiver->getReceiver() === $this) {
  1369.                 $notificationReceiver->setReceiver(null);
  1370.             }
  1371.         }
  1372.         return $this;
  1373.     }
  1374.     public function getLastLoginNotifiedAt(): ?\DateTimeInterface
  1375.     {
  1376.         return $this->lastLoginNotifiedAt;
  1377.     }
  1378.     public function setLastLoginNotifiedAt(?\DateTimeInterface $lastLoginNotifiedAt): self
  1379.     {
  1380.         $this->lastLoginNotifiedAt $lastLoginNotifiedAt;
  1381.         return $this;
  1382.     }
  1383.     /**
  1384.      * @return Collection<int, Message>
  1385.      */
  1386.     public function getReceiverMessages(): Collection
  1387.     {
  1388.         return $this->receiverMessages;
  1389.     }
  1390.     public function addReceiverMessage(Message $receiverMessage): self
  1391.     {
  1392.         if (!$this->receiverMessages->contains($receiverMessage)) {
  1393.             $this->receiverMessages[] = $receiverMessage;
  1394.             $receiverMessage->setReceiver($this);
  1395.         }
  1396.         return $this;
  1397.     }
  1398.     public function removeReceiverMessage(Message $receiverMessage): self
  1399.     {
  1400.         if ($this->receiverMessages->removeElement($receiverMessage)) {
  1401.             // set the owning side to null (unless already changed)
  1402.             if ($receiverMessage->getReceiver() === $this) {
  1403.                 $receiverMessage->setReceiver(null);
  1404.             }
  1405.         }
  1406.         return $this;
  1407.     }
  1408.     /**
  1409.      * @return Collection<int, UserQuizParticipation>
  1410.      */
  1411.     public function getUserQuizParticipations(): Collection
  1412.     {
  1413.         return $this->userQuizParticipations;
  1414.     }
  1415.     public function addUserQuizParticipation(UserQuizParticipation $userQuizParticipation): self
  1416.     {
  1417.         if (!$this->userQuizParticipations->contains($userQuizParticipation)) {
  1418.             $this->userQuizParticipations[] = $userQuizParticipation;
  1419.             $userQuizParticipation->setUser($this);
  1420.         }
  1421.         return $this;
  1422.     }
  1423.     public function removeUserQuizParticipation(UserQuizParticipation $userQuizParticipation): self
  1424.     {
  1425.         if ($this->userQuizParticipations->removeElement($userQuizParticipation)) {
  1426.             // set the owning side to null (unless already changed)
  1427.             if ($userQuizParticipation->getUser() === $this) {
  1428.                 $userQuizParticipation->setUser(null);
  1429.             }
  1430.         }
  1431.         return $this;
  1432.     }
  1433.     /**
  1434.      * @return Collection<int, GameTheme>
  1435.      */
  1436.     public function getGameThemes(): Collection
  1437.     {
  1438.         return $this->gameThemes;
  1439.     }
  1440.     public function addGameTheme(GameTheme $gameTheme): self
  1441.     {
  1442.         if (!$this->gameThemes->contains($gameTheme)) {
  1443.             $this->gameThemes[] = $gameTheme;
  1444.             $gameTheme->setCreatedBy($this);
  1445.         }
  1446.         return $this;
  1447.     }
  1448.     public function removeGameTheme(GameTheme $gameTheme): self
  1449.     {
  1450.         if ($this->gameThemes->removeElement($gameTheme)) {
  1451.             // set the owning side to null (unless already changed)
  1452.             if ($gameTheme->getCreatedBy() === $this) {
  1453.                 $gameTheme->setCreatedBy(null);
  1454.             }
  1455.         }
  1456.         return $this;
  1457.     }
  1458.     /**
  1459.      * @return Collection<int, AuditLog>
  1460.      */
  1461.     public function getLogs(): Collection
  1462.     {
  1463.         return $this->logs;
  1464.     }
  1465.     public function addLog(AuditLog $log): self
  1466.     {
  1467.         if (!$this->logs->contains($log)) {
  1468.             $this->logs[] = $log;
  1469.             $log->setUser($this);
  1470.         }
  1471.         return $this;
  1472.     }
  1473.     public function removeLog(AuditLog $log): self
  1474.     {
  1475.         if ($this->logs->removeElement($log)) {
  1476.             // set the owning side to null (unless already changed)
  1477.             if ($log->getUser() === $this) {
  1478.                 $log->setUser(null);
  1479.             }
  1480.         }
  1481.         return $this;
  1482.     }
  1483.     /**
  1484.      * @return Collection<int, GameResourceContent>
  1485.      */
  1486.     public function getGameResourceContents(): Collection
  1487.     {
  1488.         return $this->gameResourceContents;
  1489.     }
  1490.     public function addGameResourceContent(GameResourceContent $gameResourceContent): self
  1491.     {
  1492.         if (!$this->gameResourceContents->contains($gameResourceContent)) {
  1493.             $this->gameResourceContents[] = $gameResourceContent;
  1494.             $gameResourceContent->setCreatedBy($this);
  1495.         }
  1496.         return $this;
  1497.     }
  1498.     public function removeGameResourceContent(GameResourceContent $gameResourceContent): self
  1499.     {
  1500.         if ($this->gameResourceContents->removeElement($gameResourceContent)) {
  1501.             // set the owning side to null (unless already changed)
  1502.             if ($gameResourceContent->getCreatedBy() === $this) {
  1503.                 $gameResourceContent->setCreatedBy(null);
  1504.             }
  1505.         }
  1506.         return $this;
  1507.     }
  1508.     /**
  1509.      * @return Collection<int, GameSession>
  1510.      */
  1511.     public function getGameSessions(): Collection
  1512.     {
  1513.         return $this->gameSessions;
  1514.     }
  1515.     public function addGameSession(GameSession $gameSession): self
  1516.     {
  1517.         if (!$this->gameSessions->contains($gameSession)) {
  1518.             $this->gameSessions[] = $gameSession;
  1519.             $gameSession->setUser($this);
  1520.         }
  1521.         return $this;
  1522.     }
  1523.     public function removeGameSession(GameSession $gameSession): self
  1524.     {
  1525.         if ($this->gameSessions->removeElement($gameSession)) {
  1526.             // set the owning side to null (unless already changed)
  1527.             if ($gameSession->getUser() === $this) {
  1528.                 $gameSession->setUser(null);
  1529.             }
  1530.         }
  1531.         return $this;
  1532.     }
  1533.     /**
  1534.      * @return Collection<int, GameSessionItem>
  1535.      */
  1536.     public function getGameSessionItems(): Collection
  1537.     {
  1538.         return $this->gameSessionItems;
  1539.     }
  1540.     public function addGameSessionItem(GameSessionItem $gameSessionItem): self
  1541.     {
  1542.         if (!$this->gameSessionItems->contains($gameSessionItem)) {
  1543.             $this->gameSessionItems[] = $gameSessionItem;
  1544.             $gameSessionItem->setPlayer($this);
  1545.         }
  1546.         return $this;
  1547.     }
  1548.     public function removeGameSessionItem(GameSessionItem $gameSessionItem): self
  1549.     {
  1550.         if ($this->gameSessionItems->removeElement($gameSessionItem)) {
  1551.             // set the owning side to null (unless already changed)
  1552.             if ($gameSessionItem->getPlayer() === $this) {
  1553.                 $gameSessionItem->setPlayer(null);
  1554.             }
  1555.         }
  1556.         return $this;
  1557.     }
  1558. }