src/Entity/Admin/DatabaseUser.php line 14
<?php
namespace App\Entity\Admin;
use App\Repository\Admin\DatabaseUserRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Table;
#[ORM\Entity(repositoryClass: DatabaseUserRepository::class)]
#[Table(name: 'DatabaseUser')]
class DatabaseUser
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $user = null;
#[ORM\Column(length: 255)]
private ?string $fullName = null;
#[ORM\Column(length: 255)]
private ?string $password = null;
#[ORM\Column(length: 255)]
private ?string $dbName = null;
#[ORM\Column]
private ?bool $active = null;
#[ORM\Column(length: 255)]
private ?string $shortName = null;
#[ORM\Column(nullable: true)]
private ?int $displayOrder = null;
#[ORM\Column(type: Types::TEXT)]
private ?string $documentFooter = null;
#[ORM\OneToMany(mappedBy: 'clientInternal', targetEntity: ApiConnection::class)]
private Collection $apiConnections;
public function __construct()
{
$this->apiConnections = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getUser(): ?string
{
return $this->user;
}
public function setUser(string $user): self
{
$this->user = $user;
return $this;
}
public function getPassword(): ?string
{
return $this->password;
}
public function setPassword(string $password): self
{
$this->password = $password;
return $this;
}
public function getFullName(): ?string
{
return $this->fullName;
}
public function setFullName(string $fullName): self
{
$this->fullName = $fullName;
return $this;
}
public function getDbName(): ?string
{
return $this->dbName;
}
public function setDbName(string $dbName): self
{
$this->dbName = $dbName;
return $this;
}
public function isActive(): ?bool
{
return $this->active;
}
public function setActive(bool $active): self
{
$this->active = $active;
return $this;
}
public function getShortName(): ?string
{
return $this->shortName;
}
public function setShortName(string $shortName): self
{
$this->shortName = $shortName;
return $this;
}
public function getDisplayOrder(): ?int
{
return $this->displayOrder;
}
public function setDisplayOrder(?int $displayOrder): self
{
$this->displayOrder = $displayOrder;
return $this;
}
public function getDocumentFooter(): ?string
{
return $this->documentFooter;
}
public function setDocumentFooter(string $documentFooter): self
{
$this->documentFooter = $documentFooter;
return $this;
}
/**
* @return Collection<int, ApiConnection>
*/
public function getApiConnections(): Collection
{
return $this->apiConnections;
}
public function addApiConnection(ApiConnection $apiConnection): self
{
if (!$this->apiConnections->contains($apiConnection)) {
$this->apiConnections->add($apiConnection);
$apiConnection->setClientInternal($this);
}
return $this;
}
public function removeApiConnection(ApiConnection $apiConnection): self
{
if ($this->apiConnections->removeElement($apiConnection)) {
// set the owning side to null (unless already changed)
if ($apiConnection->getClientInternal() === $this) {
$apiConnection->setClientInternal(null);
}
}
return $this;
}
}