src/Entity/Domain.php line 16

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity;
  4. use App\Repository\DomainRepository;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * WEB домены
  8.  * определять к каким Доменам привязаны Сервисы
  9.  *
  10.  * @ORM\Entity(repositoryClass=DomainRepository::class)
  11.  */
  12. class Domain
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue
  17.      * @ORM\Column(type="integer", nullable=false)
  18.      */
  19.     private ?int $id null;
  20.     /**
  21.      * @ORM\Column(type="string", length=255, nullable=false)
  22.      */
  23.     private string $name;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Service::class, inversedBy="domains")
  26.      * @ORM\JoinColumn(nullable=false)
  27.      */
  28.     private Service $service;
  29.     /**
  30.      * @ORM\Column(type="boolean")
  31.      */
  32.     private bool $isTest;
  33.     public function getId(): ?int
  34.     {
  35.         return $this->id;
  36.     }
  37.     public function getName(): string
  38.     {
  39.         return $this->name;
  40.     }
  41.     public function setName(string $name): self
  42.     {
  43.         $this->name $name;
  44.         return $this;
  45.     }
  46.     public function getService(): Service
  47.     {
  48.         return $this->service;
  49.     }
  50.     public function setService(Service $service): self
  51.     {
  52.         $this->service $service;
  53.         return $this;
  54.     }
  55.     public function setIsTest(bool $isTest): self
  56.     {
  57.         $this->isTest $isTest;
  58.         return $this;
  59.     }
  60.     public function isTest(): bool
  61.     {
  62.         return $this->isTest;
  63.     }
  64. }