*/ #[ORM\OneToMany(targetEntity: InternApplication::class, mappedBy: 'application')] private ?Collection $applicants; /** * @var ?Collection */ #[ORM\OneToMany(targetEntity: InternFavorite::class, mappedBy: 'announcement')] private ?Collection $favoritesInterns; #[ORM\Column(type: Types::DATE_MUTABLE)] private ?\DateTimeInterface $creationDate = null; public function __construct() { $this->applicants = new ArrayCollection(); $this->favoritesInterns = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } public function getCompany(): ?Company { return $this->company; } public function setCompany(?Company $company): static { $this->company = $company; return $this; } public function getStatus(): ?Status { return $this->status; } public function setStatus(?Status $status): static { $this->status = $status; return $this; } /** * @return Collection */ public function getApplicants(): Collection { return $this->applicants; } public function addApplicants(InternApplication $applicants): static { if (!$this->applicants->contains($applicants)) { $this->applicants->add($applicants); $applicants->setApplication($this); } return $this; } public function removeApplicants(InternApplication $applicants): static { if ($this->applicants->removeElement($applicants)) { // set the owning side to null (unless already changed) if ($applicants->getApplication() === $this) { $applicants->setApplication(null); } } return $this; } /** * @return Collection */ public function getFavoritesInterns(): Collection { return $this->favoritesInterns; } public function addFavoritesIntern(InternFavorite $favoritesIntern): static { if (!$this->favoritesInterns->contains($favoritesIntern)) { $this->favoritesInterns->add($favoritesIntern); $favoritesIntern->setAnnouncement($this); } return $this; } public function removeFavoritesIntern(InternFavorite $favoritesIntern): static { if ($this->favoritesInterns->removeElement($favoritesIntern)) { // set the owning side to null (unless already changed) if ($favoritesIntern->getAnnouncement() === $this) { $favoritesIntern->setAnnouncement(null); } } return $this; } public function getCreationDate(): ?\DateTimeInterface { return $this->creationDate; } public function setCreationDate(\DateTimeInterface $creationDate): static { $this->creationDate = $creationDate; return $this; } }