src/Entity/AuthLog.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AuthLogRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AuthLogRepository::class)
  8.  */
  9. class AuthLog
  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="authLogs")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $user;
  22.     /**
  23.      * @ORM\Column(type="string", length=150)
  24.      */
  25.     private $country;
  26.     /**
  27.      * @ORM\Column(type="datetime")
  28.      */
  29.     private $createdAt;
  30.     /**
  31.      * @ORM\Column(type="string", length=50)
  32.      */
  33.     private $ip;
  34.     /**
  35.      * @ORM\Column(type="string", length=100, nullable=true)
  36.      */
  37.     private $ville;
  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 getCountry(): ?string
  52.     {
  53.         return $this->country;
  54.     }
  55.     public function setCountry(string $country): self
  56.     {
  57.         $this->country $country;
  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 getIp(): ?string
  70.     {
  71.         return $this->ip;
  72.     }
  73.     public function setIp(string $ip): self
  74.     {
  75.         $this->ip $ip;
  76.         return $this;
  77.     }
  78.     public function getVille(): ?string
  79.     {
  80.         return $this->ville;
  81.     }
  82.     public function setVille(?string $ville): self
  83.     {
  84.         $this->ville $ville;
  85.         return $this;
  86.     }
  87. }