src/Entity/Ipadresse.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Core\Annotation\ApiResource;
  4. use App\Repository\IpadresseRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassIpadresseRepository::class)]
  8. #[ApiResource]
  9. class Ipadresse
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(length255nullabletrue)]
  16.     private ?string $ip null;
  17.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  18.     private ?\DateTimeInterface $date null;
  19.     #[ORM\ManyToOne(inversedBy'ipadresses')]
  20.     private ?User $user null;
  21.     public function getId(): ?int
  22.     {
  23.         return $this->id;
  24.     }
  25.     public function getIp(): ?string
  26.     {
  27.         return $this->ip;
  28.     }
  29.     public function setIp(?string $ip): self
  30.     {
  31.         $this->ip $ip;
  32.         return $this;
  33.     }
  34.     public function getDate(): ?\DateTimeInterface
  35.     {
  36.         return $this->date;
  37.     }
  38.     public function setDate(?\DateTimeInterface $date): self
  39.     {
  40.         $this->date $date;
  41.         return $this;
  42.     }
  43.     public function getUser(): ?User
  44.     {
  45.         return $this->user;
  46.     }
  47.     public function setUser(?User $user): self
  48.     {
  49.         $this->user $user;
  50.         return $this;
  51.     }
  52. }