app/Plugin/TwoFactorAuthCustomer42/Entity/TwoFactorAuthType.php line 30

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Plugin\TwoFactorAuthCustomer42\Entity;
  13. use Doctrine\ORM\Mapping as ORM;
  14. use Eccube\Entity\AbstractEntity;
  15. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  16. /**
  17.  * TwoFactorConfig
  18.  *
  19.  * @ORM\Table(name="plg_two_factor_auth_type")
  20.  * @ORM\InheritanceType("SINGLE_TABLE")
  21.  * @ORM\DiscriminatorColumn(name="discriminator_type", type="string", length=255)
  22.  * @ORM\HasLifecycleCallbacks()
  23.  * @ORM\Entity(repositoryClass="Plugin\TwoFactorAuthCustomer42\Repository\TwoFactorAuthTypeRepository")
  24.  * @UniqueEntity("id")
  25.  */
  26. class TwoFactorAuthType extends AbstractEntity
  27. {
  28.     /**
  29.      * @var int
  30.      *
  31.      * @ORM\Column(name="id", type="integer", options={"unsigned":true})
  32.      * @ORM\Id
  33.      * @ORM\GeneratedValue(strategy="IDENTITY")
  34.      */
  35.     private $id;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="name", type="string", nullable=false, length=200, unique=true)
  40.      */
  41.     private $name;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="route", type="string", nullable=false, length=200, unique=true)
  46.      */
  47.     private $route null;
  48.     /**
  49.      * @var boolean
  50.      *
  51.      * @ORM\Column(name="is_disabled", type="boolean", nullable=false)
  52.      */
  53.     private $isDisabled false;
  54.     /**
  55.      * Constructor.
  56.      */
  57.     public function __construct()
  58.     {
  59.     }
  60.     /**
  61.      * Get id.
  62.      *
  63.      * @return int
  64.      */
  65.     public function getId()
  66.     {
  67.         return $this->id;
  68.     }
  69.     /**
  70.      * Get name.
  71.      *
  72.      * @return string
  73.      */
  74.     public function getName()
  75.     {
  76.         return $this->name;
  77.     }
  78.     /**
  79.      * Set name.
  80.      *
  81.      * @param string $name
  82.      *
  83.      * @return TwoFactorAuthType
  84.      */
  85.     public function setName($name)
  86.     {
  87.         $this->name $name;
  88.         return $this;
  89.     }
  90.     /**
  91.      * Get route.
  92.      *
  93.      * @return string
  94.      */
  95.     public function getRoute()
  96.     {
  97.         return $this->route;
  98.     }
  99.     /**
  100.      * Set route.
  101.      *
  102.      * @param string $route
  103.      *
  104.      * @return TwoFactorAuthType
  105.      */
  106.     public function setRoute($route)
  107.     {
  108.         $this->route $route;
  109.         return $this;
  110.     }
  111.     /**
  112.      * @return bool
  113.      */
  114.     public function isDisabled(): bool
  115.     {
  116.         return $this->isDisabled;
  117.     }
  118.     /**
  119.      * @param bool $isDisabled
  120.      */
  121.     public function setIsDisabled(bool $isDisabled): void
  122.     {
  123.         $this->isDisabled $isDisabled;
  124.     }
  125. }