<?php
namespace App\Model\User\Authtype;
use App\Model\User\Company\Company;
use App\Model\User\User;
use App\Repository\AuthtypeRepository;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass=AuthtypeRepository::class)
* @ORM\Table(name="authtype")
*/
class Authtype
{
use TimestampableEntity;
public const ATYPE_DEFAUT = 'default';
public const ATYPE_LDAP = 'ldap';
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
* @Groups({"authtype"})
*/
private $id;
/**
* @var string
* @ORM\Column(type="string", length=64)
* @Groups({"authtype"})
*/
private $name;
/**
* @var string
* @ORM\Column(type="string", length=128)
* @Groups({"authtype"})
*/
private $hostUrl;
/**
* @var string
* @ORM\Column(type="string", length=32, nullable=true)
* @Groups({"authtype"})
*/
private $domain;
/**
* @var string
* @ORM\Column(type="string", length=128, nullable=true)
* @Groups({"authtype"})
*/
private $basedn;
/**
* @var string
* @ORM\Column(type="string", length=32, nullable=true)
* @Groups({"authtype"})
*/
private $sysUser;
/**
* @var string
* @ORM\Column(type="string", length=128, nullable=true)
* @Groups({"authtype"})
*/
private $sysPass;
/**
* @var string
* @ORM\Column(type="string", length=64)
* @Groups({"authtype"})
*/
private $atype;
/**
* @var bool
* @ORM\Column(type="boolean")
*/
private $isPrimary = false;
/**
* @ORM\ManyToOne(targetEntity="App\Model\User\Company\Company")
* @ORM\JoinColumn(name="company_id", referencedColumnName="id", nullable=true)
*/
private $company = null;
/**
* @var string
* @ORM\Column(type="string", length=128, nullable=true)
* @Groups({"authtype"})
*/
private $filter;
public function getId(): ?int
{
return $this->id;
}
public function getName(): string
{
return $this->name;
}
/**
* @param string $name
*/
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return string
*/
public function getHostUrl()
{
return $this->hostUrl;
}
/**
* @param string $hostUrl
* @return self
*/
public function setHostUrl(string $hostUrl)
{
$this->hostUrl = $hostUrl;
return $this;
}
/**
* @return string
*/
public function getDomain()
{
return $this->domain;
}
/**
* @param string $domain
* @return self
*/
public function setDomain(string $domain)
{
$this->domain = $domain;
return $this;
}
/**
* @return string
*/
public function getAtype()
{
return $this->atype;
}
/**
* @param string $atype
* @return self
*/
public function setAtype(string $atype)
{
$this->atype = $atype;
return $this;
}
/**
* @return string
*/
public function getBasedn()
{
return $this->basedn;
}
/**
* @return string
*/
public function getSysUser()
{
return $this->sysUser;
}
/**
* @return string
*/
public function getSysPass()
{
return $this->sysPass;
}
/**
* @return null|Company
*/
public function getCompany(): ?Company
{
return $this->company;
}
/**
* @return self
*/
public function setCompany($company): self
{
$this->company = $company;
return $this;
}
/**
* @return string
*/
public function getFilter()
{
return $this->filter;
}
/**
* @return bool
*/
public function getIsPrimary()
{
return $this->isPrimary;
}
/**
* @param bool $isPrimary
* @return self
*/
public function setIsPrimary(bool $isPrimary): self
{
$this->isPrimary = $isPrimary;
return $this;
}
}