<?phpnamespace MedBrief\MSR\Entity;use DH\Auditor\Provider\Doctrine\Auditing\Annotation as Audit;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;/** * ProjectDeletionReport * * @ORM\Table(name="ProjectDeletionReport") * * @ORM\Entity * * @Audit\Auditable * * @Audit\Security(view={"ROLE_ALLOWED_TO_AUDIT"}) */class ProjectDeletionReport{ /** * @var int * * @ORM\Column(name="id", type="integer") * * @ORM\Id * * @ORM\GeneratedValue(strategy="IDENTITY") */ protected $id; /** * @var string|null * * @ORM\Column(name="patientDateOfBirth", type="text", nullable=true) */ protected $patientDateOfBirth; /** * @var \DateTime * * @ORM\Column(name="created", type="datetime") * * @Gedmo\Timestampable(on="create") */ protected $created; /** * @var \DateTime * * @ORM\Column(name="updated", type="datetime") * * @Gedmo\Timestampable(on="update") */ protected $updated; /** * @var Project * * @ORM\OneToOne(targetEntity="MedBrief\MSR\Entity\Project", mappedBy="projectDeletionReport") */ protected $project; /** * The Documents associated to this Report. * * @var Collection * * @ORM\OneToMany(targetEntity="MedBrief\MSR\Entity\ProjectDeletionDocument", mappedBy="projectDeletionReport") */ protected $documents; public function __construct() { $this->documents = new ArrayCollection(); } public function __toString() { return $this->project->getName() . ' Deletion report ' . $this->created; } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Get the value of created * * @return \DateTime */ public function getCreated() { return $this->created; } /** * Set the value of created * * @param \DateTime $created * * @return self */ public function setCreated(\DateTime $created) { $this->created = $created; return $this; } /** * Get the value of updated * * @return \DateTime */ public function getUpdated() { return $this->updated; } /** * Set the value of updated * * @param \DateTime $updated * * @return self */ public function setUpdated(\DateTime $updated) { $this->updated = $updated; return $this; } /** * Get the value of project * * @return Project */ public function getProject() { return $this->project; } /** * Set the value of project * * @param Project $project * * @return self */ public function setProject(?Project $project) { $this->project = $project; return $this; } /** * Get the value of patientDateOfBirth * * @return string|null */ public function getPatientDateOfBirth(): ?string { return $this->patientDateOfBirth; } /** * Set the value of patientDateOfBirth * * @param string|null $patientDateOfBirth * * @return self */ public function setPatientDateOfBirth(?string $patientDateOfBirth) { $this->patientDateOfBirth = $patientDateOfBirth; return $this; } /** * Get the Documents associated to this Report. * * @return Collection */ public function getDocuments() { return $this->documents; } /** * Add a Document * * @param ProjectDeletionDocument $document * * @return self */ public function addDocument(ProjectDeletionDocument $document): self { if (!$this->documents->contains($document)) { $this->documents[] = $document; $document->setProjectDeletionReport($this); } return $this; } /** * Remove a Document * * @param ProjectDeletionDocument $document * * @return self */ public function removeDocument(ProjectDeletionDocument $document): self { if ($this->documents->removeElement($document)) { // set the owning side to null (unless already changed) if ($document->getProjectDeletionReport() === $this) { $document->setProjectDeletionReport(null); } } return $this; }}