src/Entity/ConnectionHistory.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ConnectionHistoryRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassConnectionHistoryRepository::class)]
  7. class ConnectionHistory
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(inversedBy'connectionHistories')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private ?User $user null;
  16.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  17.     private ?\DateTimeInterface $date 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): self
  27.     {
  28.         $this->user $user;
  29.         return $this;
  30.     }
  31.     public function getDate(): ?\DateTimeInterface
  32.     {
  33.         return $this->date;
  34.     }
  35.     public function setDate(\DateTimeInterface $date): self
  36.     {
  37.         $this->date $date;
  38.         return $this;
  39.     }
  40. }