src\Model\User\Authtype\Authtype.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Model\User\Authtype;
  3. use App\Model\User\Company\Company;
  4. use App\Model\User\User;
  5. use App\Repository\AuthtypeRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. use Symfony\Component\Serializer\Annotation\Groups;
  9. /**
  10.  * @ORM\Entity(repositoryClass=AuthtypeRepository::class)
  11.  * @ORM\Table(name="authtype")
  12.  */
  13. class Authtype
  14. {
  15.     use TimestampableEntity;
  16.     public const ATYPE_DEFAUT   'default';
  17.     public const ATYPE_LDAP     'ldap';
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      * @Groups({"authtype"})
  23.      */
  24.     private $id;
  25.     /**
  26.      * @var string
  27.      * @ORM\Column(type="string", length=64)
  28.      * @Groups({"authtype"})
  29.      */
  30.     private $name;
  31.     /**
  32.      * @var string
  33.      * @ORM\Column(type="string", length=128)
  34.      * @Groups({"authtype"})
  35.      */
  36.     private $hostUrl;
  37.     /**
  38.      * @var string
  39.      * @ORM\Column(type="string", length=32, nullable=true)
  40.      * @Groups({"authtype"})
  41.      */
  42.     private $domain;
  43.     /**
  44.      * @var string
  45.      * @ORM\Column(type="string", length=128, nullable=true)
  46.      * @Groups({"authtype"})
  47.      */
  48.     private $basedn;
  49.     /**
  50.      * @var string
  51.      * @ORM\Column(type="string", length=32, nullable=true)
  52.      * @Groups({"authtype"})
  53.      */
  54.     private $sysUser;
  55.     /**
  56.      * @var string
  57.      * @ORM\Column(type="string", length=128, nullable=true)
  58.      * @Groups({"authtype"})
  59.      */
  60.     private $sysPass;
  61.     /**
  62.      * @var string
  63.      * @ORM\Column(type="string", length=64)
  64.      * @Groups({"authtype"})
  65.      */
  66.     private $atype;
  67.     /**
  68.      * @var bool
  69.      * @ORM\Column(type="boolean")
  70.      */
  71.     private $isPrimary false;
  72.     /**
  73.      * @ORM\ManyToOne(targetEntity="App\Model\User\Company\Company")
  74.      * @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
  75.      */
  76.     private $company null;
  77.     /**
  78.      * @var string
  79.      * @ORM\Column(type="string", length=128, nullable=true)
  80.      * @Groups({"authtype"})
  81.      */
  82.     private $filter;
  83.     
  84.     public function getId(): ?int
  85.     {
  86.         return $this->id;
  87.     }
  88.     public function getName(): string
  89.     {
  90.         return $this->name;
  91.     }
  92.     /**
  93.      * @param string $name 
  94.      */
  95.     public function setName(string $name): self
  96.     {
  97.         $this->name $name;
  98.         return $this;
  99.     }
  100.     /**
  101.      * @return  string
  102.      */ 
  103.     public function getHostUrl()
  104.     {
  105.         return $this->hostUrl;
  106.     }
  107.     /**
  108.      * @param  string  $hostUrl
  109.      * @return  self
  110.      */ 
  111.     public function setHostUrl(string $hostUrl)
  112.     {
  113.         $this->hostUrl $hostUrl;
  114.         return $this;
  115.     }
  116.     /**
  117.      * @return  string
  118.      */ 
  119.     public function getDomain()
  120.     {
  121.         return $this->domain;
  122.     }
  123.     /**
  124.      * @param  string  $domain
  125.      * @return  self
  126.      */ 
  127.     public function setDomain(string $domain)
  128.     {
  129.         $this->domain $domain;
  130.         return $this;
  131.     }
  132.     /**
  133.      * @return  string
  134.      */ 
  135.     public function getAtype()
  136.     {
  137.         return $this->atype;
  138.     }
  139.     /**
  140.      * @param  string  $atype
  141.      * @return  self
  142.      */ 
  143.     public function setAtype(string $atype)
  144.     {
  145.         $this->atype $atype;
  146.         return $this;
  147.     }
  148.     /**
  149.      * @return  string
  150.      */ 
  151.     public function getBasedn()
  152.     {
  153.         return $this->basedn;
  154.     }
  155.     /**
  156.      * @return  string
  157.      */ 
  158.     public function getSysUser()
  159.     {
  160.         return $this->sysUser;
  161.     }
  162.     /**
  163.      * @return  string
  164.      */ 
  165.     public function getSysPass()
  166.     {
  167.         return $this->sysPass;
  168.     }
  169.     /**
  170.      * @return null|Company 
  171.      */
  172.     public function getCompany(): ?Company
  173.     {
  174.         return $this->company;
  175.     }
  176.     /**
  177.      * @return  self
  178.      */ 
  179.     public function setCompany($company): self
  180.     {
  181.         $this->company $company;
  182.         return $this;
  183.     }
  184.     /**
  185.      * @return  string
  186.      */ 
  187.     public function getFilter()
  188.     {
  189.         return $this->filter;
  190.     }
  191.     /**
  192.      * @return  bool
  193.      */ 
  194.     public function getIsPrimary()
  195.     {
  196.         return $this->isPrimary;
  197.     }
  198.     /**
  199.      * @param  bool  $isPrimary
  200.      * @return  self
  201.      */ 
  202.     public function setIsPrimary(bool $isPrimary): self
  203.     {
  204.         $this->isPrimary $isPrimary;
  205.         return $this;
  206.     }
  207.     
  208. }