feat: treat all uploads of type 'document' as global
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -63,9 +63,6 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
#[ORM\ManyToOne(inversedBy: 'documents')]
|
||||
private ?Disposition $disposition = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private bool $global = false;
|
||||
|
||||
#[ORM\Column(type: Types::TEXT, nullable: true)]
|
||||
private ?string $comment = null;
|
||||
|
||||
@@ -222,18 +219,6 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isGlobal(): bool
|
||||
{
|
||||
return $this->global;
|
||||
}
|
||||
|
||||
public function setGlobal(bool $global): static
|
||||
{
|
||||
$this->global = $global;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getComment(): ?string
|
||||
{
|
||||
return $this->comment;
|
||||
|
||||
Reference in New Issue
Block a user