vendor/mapeveri/multi-tenancy-bundle/src/Entity/Hostname.php line 14

  1. <?php
  2. declare (strict_types=1);
  3. namespace MultiTenancyBundle\Entity;
  4. use Ambta\DoctrineEncryptBundle\Configuration\Encrypted;
  5. use MultiTenancyBundle\Repository\HostnameRepository;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=HostnameRepository::class)
  9.  */
  10. class Hostname
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $fqdn;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $username;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $host;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      * @Encrypted()
  33.      */
  34.     private $password;
  35.     /**
  36.      * @ORM\Column(type="string", length=255, nullable=true)
  37.      */
  38.     private $databaseName;
  39.     /**
  40.      * @ORM\ManyToOne(targetEntity=Tenant::class, inversedBy="hostnames", fetch="EAGER")
  41.      * @ORM\JoinColumn(nullable=false)
  42.      */
  43.     private $tenant;
  44.     /**
  45.      * @ORM\Column(type="datetime", nullable=true)
  46.      */
  47.     private $created_at;
  48.     /**
  49.      * @ORM\Column(type="datetime", nullable=true)
  50.      */
  51.     private $updated_at;
  52.     /**
  53.      * @ORM\Column(type="datetime", nullable=true)
  54.      */
  55.     private $deleted_at;
  56.     public function __construct()
  57.     {
  58.         $this->created_at = new \DateTime();
  59.         $this->updated_at = new \DateTime();
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getFqdn(): ?string
  66.     {
  67.         return $this->fqdn;
  68.     }
  69.     public function setFqdn(string $fqdn): self
  70.     {
  71.         $this->fqdn $fqdn;
  72.         return $this;
  73.     }
  74.     public function getDatabaseName(): ?string
  75.     {
  76.         return $this->databaseName;
  77.     }
  78.     public function setDatabaseName(string $databaseName): self
  79.     {
  80.         $this->databaseName $databaseName;
  81.         return $this;
  82.     }
  83.     public function getHost(): ?string
  84.     {
  85.         return $this->host;
  86.     }
  87.     public function setHost(string $host): self
  88.     {
  89.         $this->host $host;
  90.         return $this;
  91.     }
  92.     public function getPassword(): ?string
  93.     {
  94.         return $this->password;
  95.     }
  96.     public function setPassword(string $password): self
  97.     {
  98.         $this->password $password;
  99.         return $this;
  100.     }
  101.     public function getUsername(): ?string
  102.     {
  103.         return $this->username;
  104.     }
  105.     public function setUsername(string $username): self
  106.     {
  107.         $this->username $username;
  108.         return $this;
  109.     }
  110.     public function getTenant(): ?Tenant
  111.     {
  112.         return $this->tenant;
  113.     }
  114.     public function setTenant(?Tenant $tenant): self
  115.     {
  116.         $this->tenant $tenant;
  117.         return $this;
  118.     }
  119.     public function getCreatedAt(): ?\DateTimeInterface
  120.     {
  121.         return $this->created_at;
  122.     }
  123.     public function setCreatedAt(?\DateTimeInterface $created_at): self
  124.     {
  125.         $this->created_at $created_at;
  126.         return $this;
  127.     }
  128.     public function getUpdatedAt(): ?\DateTimeInterface
  129.     {
  130.         return $this->updated_at;
  131.     }
  132.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  133.     {
  134.         $this->updated_at $updated_at;
  135.         return $this;
  136.     }
  137.     public function getDeletedAt(): ?\DateTimeInterface
  138.     {
  139.         return $this->deleted_at;
  140.     }
  141.     public function setDeletedAt(?\DateTimeInterface $deleted_at): self
  142.     {
  143.         $this->deleted_at $deleted_at;
  144.         return $this;
  145.     }
  146. }