src/Entity/LoginLog.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
  5. use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
  6. /**
  7.  * @ORM\Entity()
  8.  * @ORM\Table(name="69pixl_login_log")
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class LoginLog
  12. {
  13.     /**
  14.      * @ORM\PrePersist
  15.      */
  16.     public function prePersist()
  17.     {
  18.         $this->dateCreated = new \DateTime();
  19.     }
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var datetime
  28.      * @ORM\Column(name="date_created", type="datetime", nullable=true)
  29.      */
  30.     protected $dateCreated;
  31.     /**
  32.      * @ORM\Column(type="text", nullable=true)
  33.      */
  34.     private $contentType;
  35.     /**
  36.      * @ORM\ManyToOne(targetEntity=User::class)
  37.      * @ORM\JoinColumn(nullable=false)
  38.      */
  39.     private $user;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getDateCreated(): ?\DateTimeInterface
  45.     {
  46.         return $this->dateCreated;
  47.     }
  48.     public function setDateCreated(?\DateTimeInterface $dateCreated): self
  49.     {
  50.         $this->dateCreated $dateCreated;
  51.         return $this;
  52.     }
  53.     public function getContentType(): ?string
  54.     {
  55.         return $this->contentType;
  56.     }
  57.     public function setContentType(?string $contentType): self
  58.     {
  59.         $this->contentType $contentType;
  60.         return $this;
  61.     }
  62.     public function getUser(): ?User
  63.     {
  64.         return $this->user;
  65.     }
  66.     public function setUser(?User $user): self
  67.     {
  68.         $this->user $user;
  69.         return $this;
  70.     }
  71. }