src/Entity/Admin/DatabaseUser.php line 14

  1. <?php
  2. namespace App\Entity\Admin;
  3. use App\Repository\Admin\DatabaseUserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use Doctrine\ORM\Mapping\Table;
  9. #[ORM\Entity(repositoryClassDatabaseUserRepository::class)]
  10. #[Table(name'DatabaseUser')]
  11. class DatabaseUser
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(length255)]
  18.     private ?string $user null;
  19.     #[ORM\Column(length255)]
  20.     private ?string $fullName null;
  21.     #[ORM\Column(length255)]
  22.     private ?string $password null;
  23.     #[ORM\Column(length255)]
  24.     private ?string $dbName null;
  25.     #[ORM\Column]
  26.     private ?bool $active null;
  27.     #[ORM\Column(length255)]
  28.     private ?string $shortName null;
  29.     #[ORM\Column(nullabletrue)]
  30.     private ?int $displayOrder null;
  31.     #[ORM\Column(typeTypes::TEXT)]
  32.     private ?string $documentFooter null;
  33.     #[ORM\OneToMany(mappedBy'clientInternal'targetEntityApiConnection::class)]
  34.     private Collection $apiConnections;
  35.     public function __construct()
  36.     {
  37.         $this->apiConnections = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getUser(): ?string
  44.     {
  45.         return $this->user;
  46.     }
  47.     public function setUser(string $user): self
  48.     {
  49.         $this->user $user;
  50.         return $this;
  51.     }
  52.     public function getPassword(): ?string
  53.     {
  54.         return $this->password;
  55.     }
  56.     public function setPassword(string $password): self
  57.     {
  58.         $this->password $password;
  59.         return $this;
  60.     }
  61.     public function getFullName(): ?string
  62.     {
  63.         return $this->fullName;
  64.     }
  65.     public function setFullName(string $fullName): self
  66.     {
  67.         $this->fullName $fullName;
  68.         return $this;
  69.     }
  70.     public function getDbName(): ?string
  71.     {
  72.         return $this->dbName;
  73.     }
  74.     public function setDbName(string $dbName): self
  75.     {
  76.         $this->dbName $dbName;
  77.         return $this;
  78.     }
  79.     public function isActive(): ?bool
  80.     {
  81.         return $this->active;
  82.     }
  83.     public function setActive(bool $active): self
  84.     {
  85.         $this->active $active;
  86.         return $this;
  87.     }
  88.     public function getShortName(): ?string
  89.     {
  90.         return $this->shortName;
  91.     }
  92.     public function setShortName(string $shortName): self
  93.     {
  94.         $this->shortName $shortName;
  95.         return $this;
  96.     }
  97.     public function getDisplayOrder(): ?int
  98.     {
  99.         return $this->displayOrder;
  100.     }
  101.     public function setDisplayOrder(?int $displayOrder): self
  102.     {
  103.         $this->displayOrder $displayOrder;
  104.         return $this;
  105.     }
  106.     public function getDocumentFooter(): ?string
  107.     {
  108.         return $this->documentFooter;
  109.     }
  110.     public function setDocumentFooter(string $documentFooter): self
  111.     {
  112.         $this->documentFooter $documentFooter;
  113.         return $this;
  114.     }
  115.     /**
  116.      * @return Collection<int, ApiConnection>
  117.      */
  118.     public function getApiConnections(): Collection
  119.     {
  120.         return $this->apiConnections;
  121.     }
  122.     public function addApiConnection(ApiConnection $apiConnection): self
  123.     {
  124.         if (!$this->apiConnections->contains($apiConnection)) {
  125.             $this->apiConnections->add($apiConnection);
  126.             $apiConnection->setClientInternal($this);
  127.         }
  128.         return $this;
  129.     }
  130.     public function removeApiConnection(ApiConnection $apiConnection): self
  131.     {
  132.         if ($this->apiConnections->removeElement($apiConnection)) {
  133.             // set the owning side to null (unless already changed)
  134.             if ($apiConnection->getClientInternal() === $this) {
  135.                 $apiConnection->setClientInternal(null);
  136.             }
  137.         }
  138.         return $this;
  139.     }
  140. }