src/Entity/PostLog.php line 8

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. #[ORM\Entity(repositoryClass\App\Repository\PostLogRepository::class)]
  5. class PostLog
  6. {
  7.     #[ORM\Id]
  8.     #[ORM\GeneratedValue]
  9.     #[ORM\Column(type'integer')]
  10.     private int $id;
  11.     #[ORM\ManyToOne(targetEntity\App\Entity\User::class, inversedBy'postLogs')]
  12.     private mixed $user;
  13.     #[ORM\Column(type'datetime'nullabletrue)]
  14.     private mixed $date;
  15.     public function getId(): ?int
  16.     {
  17.         return $this->id;
  18.     }
  19.     public function getUser(): ?User
  20.     {
  21.         return $this->user;
  22.     }
  23.     public function setUser(?User $user): self
  24.     {
  25.         $this->user $user;
  26.         return $this;
  27.     }
  28.     public function getDate(): ?\DateTimeInterface
  29.     {
  30.         return $this->date;
  31.     }
  32.     public function setDate(?\DateTimeInterface $date): self
  33.     {
  34.         $this->date $date;
  35.         return $this;
  36.     }
  37. }