WIP: Implement application process

This commit is contained in:
Björn Fromme
2023-10-10 17:17:30 +02:00
parent 3a458df94f
commit 6910ab6134
34 changed files with 937 additions and 119 deletions
+28
View File
@@ -73,12 +73,16 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
#[ORM\ManyToOne]
private ?User $contact = null;
#[ORM\ManyToMany(targetEntity: Teamer::class, mappedBy: 'bookmarks')]
private Collection $teamers;
public function __construct()
{
$this->uuid = Uuid::v4();
$this->fees = new ArrayCollection();
$this->applications = new ArrayCollection();
$this->dispositions = new ArrayCollection();
$this->teamers = new ArrayCollection();
$this->benefits = "Anreise im E&P Reisebus\nUnterkunft\nVerpflegung\nSkipass\n";
}
@@ -316,4 +320,28 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this;
}
/**
* @return Collection<int, Teamer>
*/
public function getTeamers(): Collection
{
return $this->teamers;
}
public function addTeamer(Teamer $teamer): static
{
if (!$this->teamers->contains($teamer)) {
$this->teamers->add($teamer);
}
return $this;
}
public function removeTeamer(Teamer $teamer): static
{
$this->teamers->removeElement($teamer);
return $this;
}
}