Feat: Assign potential comment to upload for later use

This commit is contained in:
Björn Fromme
2023-10-14 16:55:08 +02:00
parent 194cd4e59d
commit 80990c9edc
2 changed files with 22 additions and 3 deletions
+16
View File
@@ -6,6 +6,7 @@ use App\Entity\Traits\BlameableEntity;
use App\Entity\Traits\TimestampableEntity;
use App\Model\UploadDto;
use App\Repository\UploadRepository;
use Doctrine\DBAL\Types\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Uid\Uuid;
@@ -61,6 +62,9 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
#[ORM\ManyToOne(inversedBy: 'documents')]
private ?Disposition $disposition = null;
#[ORM\Column(type: Types::TEXT, nullable: true)]
private ?string $comment = null;
public function __construct()
{
$this->uuid = Uuid::v4();
@@ -198,4 +202,16 @@ class Upload implements BlameableEntityInterface, TimestampableEntityInterface
return $this;
}
public function getComment(): ?string
{
return $this->comment;
}
public function setComment(?string $comment): static
{
$this->comment = $comment;
return $this;
}
}