*/ #[ORM\OneToMany(targetEntity: Reward::class, mappedBy: 'project')] private Collection $rewards; /** * @var Collection */ #[ORM\OneToMany(targetEntity: BudgetItem::class, mappedBy: 'project')] private Collection $budgetItems; /** * @var Collection */ #[ORM\OneToMany(targetEntity: Update::class, mappedBy: 'project', cascade: ['persist'])] private Collection $updates; public function __construct() { $this->accounting = Accounting::of($this); $this->rewards = new ArrayCollection(); $this->budgetItems = new ArrayCollection(); $this->updates = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function setId(int $id): static { $this->id = $id; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): static { $this->title = $title; return $this; } public function getSubtitle(): ?string { return $this->subtitle; } public function setSubtitle(string $subtitle): static { $this->subtitle = $subtitle; return $this; } public function getDeadline(): ?ProjectDeadline { return $this->deadline; } public function setDeadline(ProjectDeadline $deadline): static { $this->deadline = $deadline; return $this; } public function getCalendar(): ?ProjectCalendar { return $this->calendar; } public function setCalendar(ProjectCalendar $calendar): static { $this->calendar = $calendar; return $this; } public function getCategory(): ?Category { return $this->category; } public function setCategory(Category $category): static { $this->category = $category; return $this; } public function getTerritory(): ?ProjectTerritory { return $this->territory; } public function setTerritory(ProjectTerritory $territory): static { $this->territory = $territory; return $this; } public function getDescription(): ?string { return $this->description; } public function setDescription(string $description): static { $this->description = $description; return $this; } public function getVideo(): ?ProjectVideo { return $this->video; } public function setVideo(?ProjectVideo $video): static { $this->video = $video; return $this; } public function getAccounting(): ?Accounting { return $this->accounting; } public function setAccounting(?Accounting $accounting): static { $this->accounting = $accounting; return $this; } public function getStatus(): ProjectStatus { return $this->status; } public function setStatus(ProjectStatus $status): static { $this->status = $status; return $this; } /** * @return Collection */ public function getRewards(): Collection { return $this->rewards; } public function addReward(Reward $reward): static { if (!$this->rewards->contains($reward)) { $this->rewards->add($reward); $reward->setProject($this); } return $this; } public function removeReward(Reward $reward): static { if ($this->rewards->removeElement($reward)) { // set the owning side to null (unless already changed) if ($reward->getProject() === $this) { $reward->setProject(null); } } return $this; } /** * @return Collection */ public function getBudgetItems(): Collection { return $this->budgetItems; } public function addBudgetItem(BudgetItem $budgetItem): static { if (!$this->budgetItems->contains($budgetItem)) { $this->budgetItems->add($budgetItem); $budgetItem->setProject($this); } return $this; } public function removeBudgetItem(BudgetItem $budgetItem): static { if ($this->budgetItems->removeElement($budgetItem)) { // set the owning side to null (unless already changed) if ($budgetItem->getProject() === $this) { $budgetItem->setProject(null); } } return $this; } /** * @return Collection */ public function getUpdates(): Collection { return $this->updates; } public function addUpdate(Update $update): static { if (!$this->updates->contains($update)) { $this->updates->add($update); $update->setProject($this); } return $this; } public function removeUpdate(Update $update): static { if ($this->updates->removeElement($update)) { // set the owning side to null (unless already changed) if ($update->getProject() === $this) { $update->setProject(null); } } return $this; } }