feat: treat all uploads of type 'document' as global

This commit is contained in:
Björn Fromme
2024-01-31 18:05:56 +01:00
parent 5ad7bfe769
commit 4be039e482
12 changed files with 15 additions and 130 deletions
-28
View File
@@ -81,9 +81,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
#[ORM\ManyToMany(targetEntity: Teamer::class, mappedBy: 'bookmarks')]
private Collection $teamers;
#[ORM\ManyToMany(targetEntity: Upload::class)]
private Collection $documents;
#[ORM\ManyToOne]
private ?User $owner = null;
@@ -99,7 +96,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
$this->dispositions = new ArrayCollection();
$this->teamers = new ArrayCollection();
$this->benefits = "Anreise im E&P Reisebus\nUnterkunft\nVerpflegung\nSkipass\n";
$this->documents = new ArrayCollection();
}
public static function duplicate(Assignment $assignment): static
@@ -432,30 +428,6 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this;
}
/**
* @return Collection<int, Upload>
*/
public function getDocuments(): Collection
{
return $this->documents;
}
public function addDocument(Upload $document): static
{
if (!$this->documents->contains($document)) {
$this->documents->add($document);
}
return $this;
}
public function removeDocument(Upload $document): static
{
$this->documents->removeElement($document);
return $this;
}
public function getOwner(): ?User
{
return $this->owner;