src/Entity/UserIp.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Constants\UserIpConstants;
  4. use App\Repository\UserIpRepository;
  5. use App\Traits\TimeTrackTrait;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassUserIpRepository::class)]
  9. class UserIp
  10. {
  11.     use TimeTrackTrait;
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id null;
  16.     #[ORM\Column(name'event_type'type'string'length191)]
  17.     private $type;
  18.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  19.     private ?string $ip null;
  20.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  21.     private ?string $operator null;
  22.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  23.     private ?string $tariff null;
  24.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  25.     private ?string $user null;
  26.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  27.     private ?string $registerEmail null;
  28.     #[ORM\Column(name'order_reference'typeTypes::TEXTnullabletrue)]
  29.     private ?string $order null;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getType(): ?string
  35.     {
  36.         return $this->type;
  37.     }
  38.     public function setType(string $type): static
  39.     {
  40.         $this->type $type;
  41.         return $this;
  42.     }
  43.     public function getTypeLabel(): string
  44.     {
  45.         $types UserIpConstants::loadValues();
  46.         return $types[$this->type] ?? (string)$this->type;
  47.     }
  48.     public function getIp(): ?string
  49.     {
  50.         return $this->ip;
  51.     }
  52.     public function setIp(string $ip): static
  53.     {
  54.         $this->ip $ip;
  55.         return $this;
  56.     }
  57.     public function getOperator(): ?string
  58.     {
  59.         return $this->operator;
  60.     }
  61.     public function setOperator(string $operator): static
  62.     {
  63.         $this->operator $operator;
  64.         return $this;
  65.     }
  66.     public function getTariff(): ?string
  67.     {
  68.         return $this->tariff;
  69.     }
  70.     public function setTariff(string $tariff): static
  71.     {
  72.         $this->tariff $tariff;
  73.         return $this;
  74.     }
  75.     public function getUser(): ?string
  76.     {
  77.         return $this->user;
  78.     }
  79.     public function setUser(string $user): static
  80.     {
  81.         $this->user $user;
  82.         return $this;
  83.     }
  84.     public function getOrder(): ?string
  85.     {
  86.         return $this->order;
  87.     }
  88.     public function setOrder(string $order): static
  89.     {
  90.         $this->order $order;
  91.         return $this;
  92.     }
  93.     public function getRegisterEmail(): ?string
  94.     {
  95.         return $this->registerEmail;
  96.     }
  97.     public function setRegisterEmail(?string $registerEmail): static
  98.     {
  99.         $this->registerEmail $registerEmail;
  100.         return $this;
  101.     }
  102.     /**
  103.      * Set createdAt.
  104.      *
  105.      * @param \DateTime|null $createdAt
  106.      *
  107.      * @return UserIp
  108.      */
  109.     public function setCreatedAt($createdAt null)
  110.     {
  111.         $this->createdAt $createdAt;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get createdAt.
  116.      *
  117.      * @return \DateTime|null
  118.      */
  119.     public function getCreatedAt()
  120.     {
  121.         return $this->createdAt;
  122.     }
  123.     /**
  124.      * Set updatedAt.
  125.      *
  126.      * @param \DateTime|null $updatedAt
  127.      *
  128.      * @return UserIp
  129.      */
  130.     public function setUpdatedAt($updatedAt null)
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get updatedAt.
  137.      *
  138.      * @return \DateTime|null
  139.      */
  140.     public function getUpdatedAt()
  141.     {
  142.         return $this->updatedAt;
  143.     }
  144. }