src/Entity/UserLogin.php line 10

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserLoginRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Timestampable\Traits\TimestampableEntity;
  6. #[ORM\Entity(repositoryClassUserLoginRepository::class)]
  7. class UserLogin
  8. {
  9.     use TimestampableEntity;
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'userLogins')]
  15.     private ?User $user null;
  16.     #[ORM\Column(length255nullabletrue)]
  17.     private ?string $ip null;
  18.     public function getId(): ?int
  19.     {
  20.         return $this->id;
  21.     }
  22.     public function getUser(): ?User
  23.     {
  24.         return $this->user;
  25.     }
  26.     public function setUser(?User $user): static
  27.     {
  28.         $this->user $user;
  29.         return $this;
  30.     }
  31.     public function getIp(): ?string
  32.     {
  33.         return $this->ip;
  34.     }
  35.     public function setIp(?string $ip): static
  36.     {
  37.         $this->ip $ip;
  38.         return $this;
  39.     }
  40. }