src/Entity/Gos/UserFirstLoginInfo.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Repository\Gos\UserFirstLoginInfoRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=UserFirstLoginInfoRepository::class)
  7.  * @ORM\HasLifecycleCallbacks()
  8.  */
  9. class UserFirstLoginInfo
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="userFirstLoginInfos")
  19.      */
  20.     private $user;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity=PortalSettings::class, inversedBy="userFirstLoginInfos")
  23.      */
  24.     private $portal;
  25.     /**
  26.      * @ORM\Column(type="datetime")
  27.      */
  28.     private $createdAt;
  29.     /**
  30.      * @ORM\Column(type="datetime", nullable=true)
  31.      */
  32.     private $lastLoginAt;
  33.     /** @ORM\PrePersist() */
  34.     public function onPrePersist()
  35.     {
  36.         $this->createdAt = new \DateTime();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getUser(): ?User
  43.     {
  44.         return $this->user;
  45.     }
  46.     public function setUser(?User $user): self
  47.     {
  48.         $this->user $user;
  49.         return $this;
  50.     }
  51.     public function getPortal(): ?PortalSettings
  52.     {
  53.         return $this->portal;
  54.     }
  55.     public function setPortal(?PortalSettings $portal): self
  56.     {
  57.         $this->portal $portal;
  58.         return $this;
  59.     }
  60.     public function getCreatedAt(): ?\DateTimeInterface
  61.     {
  62.         return $this->createdAt;
  63.     }
  64.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  65.     {
  66.         $this->createdAt $createdAt;
  67.         return $this;
  68.     }
  69.     public function getLastLoginAt(): ?\DateTimeInterface
  70.     {
  71.         return $this->lastLoginAt;
  72.     }
  73.     public function setLastLoginAt(?\DateTimeInterface $lastLoginAt): self
  74.     {
  75.         $this->lastLoginAt $lastLoginAt;
  76.         return $this;
  77.     }
  78. }