<?php
namespace App\Entity;
use App\Entity\Base\AbstractTimestampableEntity;
use App\Entity\Traits\ToStringNameTrait;
use App\Repository\ProjectTypeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ProjectTypeRepository::class)
* @ORM\HasLifecycleCallbacks
*/
class ProjectType extends AbstractTimestampableEntity
{
const PROJECT_TYPE_HOSTING = 1;
const PROJECT_TYPE_KARBANTARTAS = 2;
const PROJECT_TYPE_ERP_FEJLESZTES = 3;
const PROJECT_TYPE_WEB_FEJLESZTES = 4;
const PROJECT_TYPE_ACT_ADITIONAL = 5;
use ToStringNameTrait;
/**
* @ORM\Column(type="string", length=255)
*/
private string $name;
/**
* @ORM\OneToMany(targetEntity=Contract::class, mappedBy="contractType")
*/
private Collection $contracts;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $contentRo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $contentHu;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $contentEn;
/**
* @ORM\Column(type="boolean",nullable=true, options={"default":false})
*/
private ?bool $deleted = false;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $anexaRo;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $anexaHu;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $anexaEn;
/**
* @ORM\Column(type="text", nullable=true)
*/
private $comment;
public function __construct()
{
$this->contracts = new ArrayCollection();
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return Collection<int, Contract>
*/
public function getContract(): Collection
{
return $this->contracts;
}
public function addContract(Contract $contract): self
{
if (!$this->contracts->contains($contract)) {
$this->contracts[] = $contract;
$contract->setContractType($this);
}
return $this;
}
public function removeContract(Contract $contract): self
{
if ($this->contracts->removeElement($contract)) {
// set the owning side to null (unless already changed)
if ($contract->getContractType() === $this) {
$contract->setContractType(null);
}
}
return $this;
}
public function getContentRo(): ?string
{
return $this->contentRo;
}
public function setContentRo(?string $contentRo): self
{
$this->contentRo = $contentRo;
return $this;
}
public function getContentHu(): ?string
{
return $this->contentHu;
}
public function setContentHu(?string $contentHu): ProjectType
{
$this->contentHu = $contentHu;
return $this;
}
public function getContentEn(): ?string
{
return $this->contentEn;
}
public function setContentEn(?string $contentEn): ProjectType
{
$this->contentEn = $contentEn;
return $this;
}
public function isDeleted(): ?bool
{
return $this->deleted;
}
public function setDeleted(bool $deleted): self
{
$this->deleted = $deleted;
return $this;
}
public function getAnexaRo(): ?string
{
return $this->anexaRo;
}
public function setAnexaRo(?string $anexaRo): self
{
$this->anexaRo = $anexaRo;
return $this;
}
public function getAnexaHu(): ?string
{
return $this->anexaHu;
}
public function setAnexaHu(?string $anexaHu): ProjectType
{
$this->anexaHu = $anexaHu;
return $this;
}
public function getAnexaEn(): ?string
{
return $this->anexaEn;
}
public function setAnexaEn(?string $anexaEn): ProjectType
{
$this->anexaEn = $anexaEn;
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): self
{
$this->comment = $comment;
return $this;
}
}