src/Entity/ConnectionLog.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ConnectionLogRepository;
  4. use DateTimeInterface;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassConnectionLogRepository::class)]
  8. class ConnectionLog
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column]
  13.     private ?int $id null;
  14.     #[ORM\ManyToOne(inversedBy'connectionLogs')]
  15.     #[ORM\JoinColumn(nullablefalse)]
  16.     private ?User $user null;
  17.     #[ORM\ManyToOne(inversedBy'connectionLogs')]
  18.     #[ORM\JoinColumn(nullablefalse)]
  19.     private ?Establishment $establishment null;
  20.     #[ORM\Column(typeTypes::DATETIME_MUTABLE)]
  21.     private ?DateTimeInterface $createdAt null;
  22.     public function getId(): ?int
  23.     {
  24.         return $this->id;
  25.     }
  26.     public function getUser(): ?User
  27.     {
  28.         return $this->user;
  29.     }
  30.     public function setUser(?User $user): self
  31.     {
  32.         $this->user $user;
  33.         return $this;
  34.     }
  35.     public function getEstablishment(): ?Establishment
  36.     {
  37.         return $this->establishment;
  38.     }
  39.     public function setEstablishment(?Establishment $establishment): self
  40.     {
  41.         $this->establishment $establishment;
  42.         return $this;
  43.     }
  44.     public function getCreatedAt(): ?DateTimeInterface
  45.     {
  46.         return $this->createdAt;
  47.     }
  48.     public function setCreatedAt(DateTimeInterface $createdAt): self
  49.     {
  50.         $this->createdAt $createdAt;
  51.         return $this;
  52.     }
  53. }