Feat: Add status to assignments to control applications

This commit is contained in:
Björn Fromme
2023-11-03 10:45:37 +01:00
parent 0d7f9afdfe
commit 49efa30e2a
5 changed files with 71 additions and 1 deletions
+19
View File
@@ -21,6 +21,9 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
use TimestampableEntity;
use SoftDeletableEntity;
public const STATUS_OPEN = 'open';
public const STATUS_CLOSED = 'closed';
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
@@ -84,9 +87,13 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
#[ORM\ManyToOne]
private ?User $owner = null;
#[ORM\Column(length: 64)]
private ?string $status;
public function __construct()
{
$this->uuid = Uuid::v4();
$this->status = static::STATUS_OPEN;
$this->fees = new ArrayCollection();
$this->applications = new ArrayCollection();
$this->dispositions = new ArrayCollection();
@@ -436,4 +443,16 @@ class Assignment implements BlameableEntityInterface, TimestampableEntityInterfa
return $this;
}
public function getStatus(): ?string
{
return $this->status;
}
public function setStatus(string $status): static
{
$this->status = $status;
return $this;
}
}