src/Entity/Accounts/IpBlackList.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Accounts;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * IpBlackList
  7.  *
  8.  * @ORM\Table(name="otp_accounts.ip_black_list", uniqueConstraints={@ORM\UniqueConstraint(name="ip", columns={"ip"})})
  9.  * @ORM\Entity
  10.  */
  11. class IpBlackList
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="smallint", nullable=false, options={"unsigned"=true})
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="IDENTITY")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string
  23.      *
  24.      * @ORM\Column(name="ip", type="string", length=15, nullable=false, options={"fixed"=true,"comment"="ip / первая часть ip, который блокируем"})
  25.      */
  26.     private $ip;
  27.     /**
  28.      * @var \DateTime
  29.      *
  30.      * @ORM\Column(name="dateAdd", type="datetime", nullable=false, options={"default"="CURRENT_TIMESTAMP","comment"="дата добавления"})
  31.      */
  32.     private $dateadd 'CURRENT_TIMESTAMP';
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getIp(): ?string
  38.     {
  39.         return $this->ip;
  40.     }
  41.     public function setIp(string $ip): static
  42.     {
  43.         $this->ip $ip;
  44.         return $this;
  45.     }
  46.     public function getDateadd(): ?\DateTimeInterface
  47.     {
  48.         return $this->dateadd;
  49.     }
  50.     public function setDateadd(\DateTimeInterface $dateadd): static
  51.     {
  52.         $this->dateadd $dateadd;
  53.         return $this;
  54.     }
  55. }