feat: extend job-profile and feedback entities for future statistics

This commit is contained in:
Björn Fromme committed 2025-12-18 12:01:58 +01:00
1 parent 149d793fa1
commit 9400b78a9f
8 files changed
+237 -1

No files matched your search

+28
View File
@@ -91,6 +91,9 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
#[ORM\ManyToMany(targetEntity: Teamer::class, mappedBy: 'bookmarks')]
private Collection $teamers;
#[ORM\OneToMany(mappedBy: 'assignment', targetEntity: Feedback::class)]
private Collection $feedback;
#[ORM\ManyToOne]
private ?User $owner = null;
@@ -109,6 +112,7 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
$this->applications = new ArrayCollection();
$this->dispositions = new ArrayCollection();
$this->teamers = new ArrayCollection();
$this->feedback = new ArrayCollection();
$this->benefits = "Anreise im E&P Reisebus\nUnterkunft\nVerpflegung\nSkipass\n";
}
@@ -537,6 +541,30 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this;
}
/**
* @return Collection<int, Feedback#>
*/
public function getFeedback(): Collection
{
return $this->feedback;
}
public function addFeedback(Feedback $feedback): static
{
if (!$this->feedback->contains($feedback)) {
$this->feedback->add($feedback);
}
return $this;
}
public function removeFeedback(Feedback $feedback): static
{
$this->feedback->removeElement($feedback);
return $this;
}
public function getOwner(): ?User
{
return $this->owner;