<?phpnamespace App\Entity;use App\Repository\SitesRepository;use DH\Auditor\Provider\Doctrine\Auditing\Annotation\Auditable;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=SitesRepository::class) * @Auditable() */class Sites{ /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $label; /** * @ORM\ManyToOne(targetEntity="App\Entity\Sites") * @ORM\JoinColumn(nullable=true) */ private $parent; /** * @ORM\Column(type="boolean", nullable=true) */ private $isDeleted; /** * @ORM\Column(type="datetime", nullable=true) */ private $dateUpdate; /** * @ORM\Column(type="datetime", nullable=true) */ private $dateCreate; /** * @ORM\ManyToOne(targetEntity=Users::class) */ private $userCreate; /** * @ORM\ManyToOne(targetEntity=Users::class) */ private $userUpdate; /** * @ORM\ManyToOne(targetEntity=Pcode::class) */ private $pcode; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $authorityName; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $signatureFile; /** * @ORM\OneToMany(targetEntity=Report::class, mappedBy="site") */ private $reports; /** * @ORM\ManyToOne(targetEntity=TypeSite::class) */ private $typeSite; public function __construct() { $this->isDeleted = false; $this->dateCreate = new \DateTime(); $this->reports = new ArrayCollection(); } public function setId(int $id): self{ $this->id = $id; return $this; } public function getId(): ?int { return $this->id; } public function getLabel(): ?string { return $this->label; } public function setLabel(string $label): self { $this->label = $label; return $this; } public function getParent(): ?self { return $this->parent; } public function setParent(?self $parent): self { $this->parent = $parent; return $this; } public function getIsDeleted(): ?bool { return $this->isDeleted; } public function setIsDeleted(?bool $isDeleted): self { $this->isDeleted = $isDeleted; return $this; } public function getDateUpdate(): ?\DateTimeInterface { return $this->dateUpdate; } public function setDateUpdate(?\DateTimeInterface $dateUpdate): self { $this->dateUpdate = $dateUpdate; return $this; } public function getDateCreate(): ?\DateTimeInterface { return $this->dateCreate; } public function setDateCreate(?\DateTimeInterface $dateCreate): self { $this->dateCreate = $dateCreate; return $this; } public function getUserCreate(): ?Users { return $this->userCreate; } public function setUserCreate(?Users $userCreate): self { $this->userCreate = $userCreate; return $this; } public function getUserUpdate(): ?Users { return $this->userUpdate; } public function setUserUpdate(?Users $userUpdate): self { $this->userUpdate = $userUpdate; return $this; } public function getPcode(): ?Pcode { return $this->pcode; } public function setPcode(?Pcode $pcode): self { $this->pcode = $pcode; return $this; } public function getAuthorityName(): ?string { return $this->authorityName; } public function setAuthorityName(?string $authorityName): self { $this->authorityName = $authorityName; return $this; } public function getSignatureFile(): ?string { return $this->signatureFile; } public function setSignatureFile(?string $signatureFile): self { $this->signatureFile = $signatureFile; return $this; } /** * @return Collection|Report[] */ public function getReports(): Collection { return $this->reports; } public function addReport(Report $report): self { if (!$this->reports->contains($report)) { $this->reports[] = $report; $report->setSite($this); } return $this; } public function removeReport(Report $report): self { if ($this->reports->removeElement($report)) { // set the owning side to null (unless already changed) if ($report->getSite() === $this) { $report->setSite(null); } } return $this; } public function getTypeSite(): ?TypeSite { return $this->typeSite; } public function setTypeSite(?TypeSite $typeSite): self { $this->typeSite = $typeSite; return $this; }}