src/Entity/ProjectType.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Base\AbstractTimestampableEntity;
  4. use App\Entity\Traits\ToStringNameTrait;
  5. use App\Repository\ProjectTypeRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. /**
  10.  * @ORM\Entity(repositoryClass=ProjectTypeRepository::class)
  11.  * @ORM\HasLifecycleCallbacks
  12.  */
  13. class ProjectType extends AbstractTimestampableEntity
  14. {
  15.     const PROJECT_TYPE_HOSTING 1;
  16.     const PROJECT_TYPE_KARBANTARTAS 2;
  17.     const PROJECT_TYPE_ERP_FEJLESZTES 3;
  18.     const PROJECT_TYPE_WEB_FEJLESZTES 4;
  19.     const PROJECT_TYPE_ACT_ADITIONAL 5;
  20.     use ToStringNameTrait;
  21.     /**
  22.      * @ORM\Column(type="string", length=255)
  23.      */
  24.     private string $name;
  25.     /**
  26.      * @ORM\OneToMany(targetEntity=Contract::class, mappedBy="contractType")
  27.      */
  28.     private Collection $contracts;
  29.     /**
  30.      * @ORM\Column(type="text", nullable=true)
  31.      */
  32.     private ?string $contentRo;
  33.     /**
  34.      * @ORM\Column(type="text", nullable=true)
  35.      */
  36.     private ?string $contentHu;
  37.     /**
  38.      * @ORM\Column(type="text", nullable=true)
  39.      */
  40.     private ?string $contentEn;
  41.     /**
  42.      * @ORM\Column(type="boolean",nullable=true, options={"default":false})
  43.      */
  44.     private ?bool $deleted false;
  45.     /**
  46.      * @ORM\Column(type="text", nullable=true)
  47.      */
  48.     private ?string $anexaRo;
  49.     /**
  50.      * @ORM\Column(type="text", nullable=true)
  51.      */
  52.     private ?string $anexaHu;
  53.     /**
  54.      * @ORM\Column(type="text", nullable=true)
  55.      */
  56.     private ?string $anexaEn;
  57.     /**
  58.      * @ORM\Column(type="text", nullable=true)
  59.      */
  60.     private $comment;
  61.     public function __construct()
  62.     {
  63.         $this->contracts = new ArrayCollection();
  64.     }
  65.     public function getName(): ?string
  66.     {
  67.         return $this->name;
  68.     }
  69.     public function setName(string $name): self
  70.     {
  71.         $this->name $name;
  72.         return $this;
  73.     }
  74.     /**
  75.      * @return Collection<int, Contract>
  76.      */
  77.     public function getContract(): Collection
  78.     {
  79.         return $this->contracts;
  80.     }
  81.     public function addContract(Contract $contract): self
  82.     {
  83.         if (!$this->contracts->contains($contract)) {
  84.             $this->contracts[] = $contract;
  85.             $contract->setContractType($this);
  86.         }
  87.         return $this;
  88.     }
  89.     public function removeContract(Contract $contract): self
  90.     {
  91.         if ($this->contracts->removeElement($contract)) {
  92.             // set the owning side to null (unless already changed)
  93.             if ($contract->getContractType() === $this) {
  94.                 $contract->setContractType(null);
  95.             }
  96.         }
  97.         return $this;
  98.     }
  99.     public function getContentRo(): ?string
  100.     {
  101.         return $this->contentRo;
  102.     }
  103.     public function setContentRo(?string $contentRo): self
  104.     {
  105.         $this->contentRo $contentRo;
  106.         return $this;
  107.     }
  108.     public function getContentHu(): ?string
  109.     {
  110.         return $this->contentHu;
  111.     }
  112.     public function setContentHu(?string $contentHu): ProjectType
  113.     {
  114.         $this->contentHu $contentHu;
  115.         return $this;
  116.     }
  117.     public function getContentEn(): ?string
  118.     {
  119.         return $this->contentEn;
  120.     }
  121.     public function setContentEn(?string $contentEn): ProjectType
  122.     {
  123.         $this->contentEn $contentEn;
  124.         return $this;
  125.     }
  126.     public function isDeleted(): ?bool
  127.     {
  128.         return $this->deleted;
  129.     }
  130.     public function setDeleted(bool $deleted): self
  131.     {
  132.         $this->deleted $deleted;
  133.         return $this;
  134.     }
  135.     public function getAnexaRo(): ?string
  136.     {
  137.         return $this->anexaRo;
  138.     }
  139.     public function setAnexaRo(?string $anexaRo): self
  140.     {
  141.         $this->anexaRo $anexaRo;
  142.         return $this;
  143.     }
  144.     public function getAnexaHu(): ?string
  145.     {
  146.         return $this->anexaHu;
  147.     }
  148.     public function setAnexaHu(?string $anexaHu): ProjectType
  149.     {
  150.         $this->anexaHu $anexaHu;
  151.         return $this;
  152.     }
  153.     public function getAnexaEn(): ?string
  154.     {
  155.         return $this->anexaEn;
  156.     }
  157.     public function setAnexaEn(?string $anexaEn): ProjectType
  158.     {
  159.         $this->anexaEn $anexaEn;
  160.         return $this;
  161.     }
  162.     public function getComment(): ?string
  163.     {
  164.         return $this->comment;
  165.     }
  166.     public function setComment(?string $comment): self
  167.     {
  168.         $this->comment $comment;
  169.         return $this;
  170.     }
  171. }