<?phpnamespace App\Entity;use App\Repository\DocumentTypeRepository;use Doctrine\ORM\Mapping as ORM;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Symfony\Component\Serializer\Annotation\Groups;/** * @ORM\Entity(repositoryClass=DocumentTypeRepository::class) * @ORM\Table(name="69pixl_document_type") */class DocumentType{ /** * @ORM\PrePersist */ public function prePersist() { $this->dateCreated = new \DateTime(); } /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @Groups({"type_group"}) * @ORM\Column(type="string", length=255, nullable=true) */ private $name; /** * @ORM\Column(type="integer", nullable=true) */ private $number_page; /** * @ORM\Column(type="boolean", nullable=true) */ private $signed_order; /** * @ORM\Column(name="date_created", type="datetime", nullable=true) */ protected $dateCreated; /** * @var fileAttribute[] * @ORM\OneToMany(targetEntity="App\Entity\Cp", mappedBy="fileType") */ protected $fileAttribute; /** * @ORM\OneToMany(targetEntity="App\Entity\SignatoryDocType", mappedBy="docType") */ protected $docTypeSignatory; public function __construct() { $this->fileAttribute = new ArrayCollection(); $this->docTypeSignatory = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(?string $name): self { $this->name = $name; return $this; } public function getNumberPage(): ?int { return $this->number_page; } public function setNumberPage(?int $number_page): self { $this->number_page = $number_page; return $this; } public function isSignedOrder(): ?bool { return $this->signed_order; } public function setSignedOrder(?bool $signed_order): self { $this->signed_order = $signed_order; return $this; } public function getDateCreated(): ?\DateTimeInterface { return $this->dateCreated; } public function setDateCreated(?\DateTimeInterface $dateCreated): self { $this->dateCreated = $dateCreated; return $this; } /** * @return Collection|Cp[] */ public function getFileAttribute(): Collection { return $this->fileAttribute; } public function addFileAttribute(Cp $file): self { if (!$this->fileAttribute->contains($file)) { $this->fileAttribute[] = $file; $file->setFileType($this); } return $this; } public function removeFileAttribute(Cp $file): self { if ($this->fileAttribute->removeElement($file)) { // set the owning side to null (unless already changed) if ($file->getFileType() === $this) { $file->setFileType(null); } } return $this; } public function getDocTypeSignatory(): Collection { return $this->docTypeSignatory; } public function addDocTypeSignatory(SignatoryDocType $file): self { if (!$this->docTypeSignatory->contains($file)) { $this->docTypeSignatory[] = $file; $file->setDocType($this); } return $this; } public function removeDocTypeSignatory(SignatoryDocType $file): self { if ($this->docTypeSignatory->removeElement($file)) { // set the owning side to null (unless already changed) if ($file->getDocType() === $this) { $file->setDocType(null); } } return $this; }}