src/Entity/Port.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PortRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Overblog\GraphQLBundle\Annotation\Field;
  6. use DateTimeImmutable;
  7. #[ORM\Entity(repositoryClassPortRepository::class)]
  8. class Port extends BasicEntity
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue]
  12.     #[ORM\Column(type"integer")]
  13.     #[Field(name"id"type"int")]
  14.     private $id;
  15.     #[ORM\Column(type"integer")]
  16.     #[Field(name"port"type"int")]
  17.     private $port;
  18.     #[ORM\ManyToMany(targetEntityExposedIp::class, mappedBy'ports')]
  19.     private $exposedIps;
  20.     #[ORM\Column(type"boolean"options: ['default' => true])]
  21.     #[Field(name"is_active"type"boolean")]
  22.     private $isActive;
  23.     #[ORM\Column(type'datetime_immutable'nullabletrue)]
  24.     #[Field(name"last_seen"type"string")]
  25.     private $lastSeen;
  26.     #[ORM\ManyToOne(targetEntityStatus::class, inversedBy'exposedIps')]
  27.     #[ORM\JoinColumn(nullabletrueoptions: ['default' => 1])]
  28.     #[Field(name"status")]
  29.     private $status;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getPort(): ?int
  35.     {
  36.         return $this->port;
  37.     }
  38.     public function setPort(int $port): self
  39.     {
  40.         $this->port $port;
  41.         return $this;
  42.     }
  43.     public function getIsActive(): ?bool
  44.     {
  45.         return $this->isActive;
  46.     }
  47.     public function setIsActive(?bool $isActive): self
  48.     {
  49.         $this->isActive $isActive;
  50.         return $this;
  51.     }
  52.     public function getLastSeen(): ?DateTimeImmutable
  53.     {
  54.         return $this->lastSeen;
  55.     }
  56.     public function setLastSeen(?DateTimeImmutable $lastSeen): self
  57.     {
  58.         $this->lastSeen $lastSeen;
  59.         return $this;
  60.     }
  61.     public function getStatus(): ?Status
  62.     {
  63.         return $this->status;
  64.     }
  65.     public function setStatus(?Status $status): self
  66.     {
  67.         $this->status $status;
  68.         return $this;
  69.     }
  70. }