src/Entity/UserLoginHistory.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserLoginHistoryRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Symfony\Component\Security\Core\User\UserInterface;
  7. #[ORM\Entity(repositoryClassUserLoginHistoryRepository::class), ORM\Table(name'user_login_history')]
  8. class UserLoginHistory
  9. {
  10.     #[ORM\IdORM\GeneratedValueORM\Column(type'integer')]
  11.     private $id;
  12.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'loginHistory'), ORM\JoinColumn(nullablefalse)]
  13.     private $user;
  14.     #[ORM\Column(type'string'length50)]
  15.     private $userIp;
  16.     #[ORM\Column(type'string'length100)]
  17.     private $fileUrl;
  18.     #[ORM\Column(type'integer'length11)]
  19.     private $loginAttempts;
  20.     #[Gedmo\Timestampable(on'create'), ORM\Column(type'datetime')]
  21.     private $loggedInAt;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getUser(): ?UserInterface
  27.     {
  28.         return $this->user;
  29.     }
  30.     public function setUser(?UserInterface $user): self
  31.     {
  32.         $this->user $user;
  33.         return $this;
  34.     }
  35.     public function getUserIp(): ?string
  36.     {
  37.         return $this->userIp;
  38.     }
  39.     public function setUserIp(string $userIp): self
  40.     {
  41.         $this->userIp $userIp;
  42.         return $this;
  43.     }
  44.     public function getLoggedInAt(): ?\DateTimeInterface
  45.     {
  46.         return $this->loggedInAt;
  47.     }
  48.     public function getloginAttempts(): ?int
  49.     {
  50.         return $this->loginAttempts;
  51.     }
  52.     public function setLoginAttempts(int $loginAttempts): self
  53.     {
  54.         $this->loginAttempts $loginAttempts;
  55.         return $this;
  56.     }
  57.     public function getFileUrl(): ?string
  58.     {
  59.         return $this->fileUrl;
  60.     }
  61.     public function setFileUrl(string $fileUrl): self
  62.     {
  63.         $this->fileUrl $fileUrl;
  64.         return $this;
  65.     }
  66. }